Skip to content

Commit 0f5a15d

Browse files
committed
fix: Prune test programs
1 parent 5d07185 commit 0f5a15d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,11 @@ mod tests {
392392
}
393393

394394
fn run(self) -> Result<(), simplicity::bit_machine::ExecutionError> {
395-
let mut mac = BitMachine::for_program(self.program.redeem())
396-
.expect("program should be within reasonable bounds");
397395
let env = dummy_env::dummy_with(self.lock_time, self.sequence, self.include_fee_output);
398-
mac.exec(self.program.redeem(), &env).map(|_| ())
396+
let pruned = self.program.redeem().prune(&env)?;
397+
let mut mac = BitMachine::for_program(&pruned)
398+
.expect("program should be within reasonable bounds");
399+
mac.exec(&pruned, &env).map(|_| ())
399400
}
400401

401402
pub fn assert_run_success(self) {

0 commit comments

Comments
 (0)