Skip to content

Commit

Permalink
Merge pull request #4546 from driftluo/fix-test
Browse files Browse the repository at this point in the history
test: fix test random panic
  • Loading branch information
quake authored Jul 24, 2024
2 parents 0766dea + 954917c commit 7358d32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions script/src/verify/tests/ckb_latest/features_since_v2021.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,11 +845,13 @@ fn _check_typical_secp256k1_blake160_2_in_2_out_tx_with_snap(step_cycles: Cycle)
let mut cycles = 0;
let verifier = TransactionScriptsVerifierWithEnv::new();
let result = verifier.verify_map(script_version, &rtx, |verifier| {
#[allow(unused_assignments)]
let mut init_snap: Option<TransactionSnapshot> = None;
let mut init_state: Option<TransactionState> = None;

if let VerifyResult::Suspended(state) = verifier.resumable_verify(step_cycles).unwrap() {
init_snap = Some(state.try_into().unwrap());
match verifier.resumable_verify(step_cycles).unwrap() {
VerifyResult::Suspended(state) => init_snap = Some(state.try_into().unwrap()),
VerifyResult::Completed(cycle) => return Ok(cycle),
}

let mut count = 0;
Expand Down

0 comments on commit 7358d32

Please sign in to comment.