From fd95df7c6f59bdb38b5734ae658e043f596cd20b Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 5 Jun 2026 18:55:53 +0800 Subject: [PATCH] fix: test in harness --- fuzz_props/src/tests/invariants.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fuzz_props/src/tests/invariants.rs b/fuzz_props/src/tests/invariants.rs index 1d799ab..18f79e6 100644 --- a/fuzz_props/src/tests/invariants.rs +++ b/fuzz_props/src/tests/invariants.rs @@ -255,8 +255,10 @@ fn assert_replay_rejection_panics_when_replay_not_rejected() { // We do NOT apply the tx first. The state nonce is still 0, so calling // execute_check_on_state would SUCCEED — making this a "successful replay". // assert_replay_rejection is supposed to panic here (INVARIANT VIOLATION [ReplayRejection]). + // block_id=0 is the genesis block; transactions are only valid from block_id=1 onwards, + // so use (1, 0) to ensure execute_check_on_state accepts the tx (triggering the panic). let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { - assert_replay_rejection(tx, &mut state, 0, 0); + assert_replay_rejection(tx, &mut state, 1, 0); })); assert!(