Skip to content

Commit 0fba94e

Browse files
committed
fix: Prune test programs
1 parent a4af9f2 commit 0fba94e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,11 @@ mod tests {
390390
}
391391

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

399400
pub fn assert_run_success(self) {

0 commit comments

Comments
 (0)