Skip to content

Commit

Permalink
Fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Jan 22, 2025
1 parent b8a6620 commit 4672878
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 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 @@ -890,12 +890,17 @@ fn _check_typical_secp256k1_blake160_2_in_2_out_tx_with_state(step_cycles: Cycle

#[test]
fn check_typical_secp256k1_blake160_2_in_2_out_tx_with_state() {
let cycle_bound = if SCRIPT_VERSION >= ScriptVersion::V2 {
V2_CYCLE_BOUND
} else {
CYCLE_BOUND
};
if SCRIPT_VERSION >= ScriptVersion::V1 {
let mut rng = thread_rng();
let step_cycles1 = rng.sample(Uniform::from(1..100u64));
_check_typical_secp256k1_blake160_2_in_2_out_tx_with_state(step_cycles1);

let step_cycles2 = rng.sample(Uniform::from(100u64..TWO_IN_TWO_OUT_CYCLES - CYCLE_BOUND));
let step_cycles2 = rng.sample(Uniform::from(100u64..TWO_IN_TWO_OUT_CYCLES - cycle_bound));
_check_typical_secp256k1_blake160_2_in_2_out_tx_with_state(step_cycles2);
}
}
Expand Down Expand Up @@ -977,13 +982,18 @@ fn _check_typical_secp256k1_blake160_2_in_2_out_tx_with_snap(step_cycles: Cycle)

#[test]
fn check_typical_secp256k1_blake160_2_in_2_out_tx_with_snap() {
let cycle_bound = if SCRIPT_VERSION >= ScriptVersion::V2 {
V2_CYCLE_BOUND
} else {
CYCLE_BOUND
};
if SCRIPT_VERSION >= ScriptVersion::V1 {
let mut rng = thread_rng();
let step_cycles1 = rng.sample(Uniform::from(1..100u64));
_check_typical_secp256k1_blake160_2_in_2_out_tx_with_snap(step_cycles1);

let step_cycles2 = rng.sample(Uniform::from(
TWO_IN_TWO_OUT_CYCLES / 10..TWO_IN_TWO_OUT_CYCLES - CYCLE_BOUND,
TWO_IN_TWO_OUT_CYCLES / 10..TWO_IN_TWO_OUT_CYCLES - cycle_bound,
));
_check_typical_secp256k1_blake160_2_in_2_out_tx_with_snap(step_cycles2);
}
Expand Down

0 comments on commit 4672878

Please sign in to comment.