Skip to content

Commit 2bad980

Browse files
committed
Fix tx_replay_rejected_when_forking_across_reward_cycles
Signed-off-by: Jacinta Ferrant <jacinta.ferrant@gmail.com>
1 parent db67b86 commit 2bad980

File tree

1 file changed

+10
-19
lines changed
  • testnet/stacks-node/src/tests/signer

1 file changed

+10
-19
lines changed

testnet/stacks-node/src/tests/signer/v0.rs

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3504,25 +3504,16 @@ fn tx_replay_rejected_when_forking_across_reward_cycle() {
35043504
assert_eq!(0, post_fork_tx_nonce);
35053505

35063506
info!("----- Check Signers Tx Replay state -----");
3507-
3508-
let info = get_chain_info(&signer_test.running_nodes.conf);
3509-
let all_signers = signer_test.signer_test_pks();
3510-
wait_for_state_machine_update(
3511-
30,
3512-
&info.pox_consensus,
3513-
info.burn_block_height,
3514-
None,
3515-
&all_signers,
3516-
SUPPORTED_SIGNER_PROTOCOL_VERSION,
3517-
)
3518-
.expect("Timed out waiting for signer states to update");
3519-
let (signer_states, _) = signer_test.get_burn_updated_states();
3520-
for state in signer_states {
3521-
assert!(
3522-
state.get_tx_replay_set().is_none(),
3523-
"Signer state is in tx replay state, when it shouldn't be"
3524-
);
3525-
}
3507+
wait_for(30, || {
3508+
let (states, _) = signer_test.get_burn_updated_states();
3509+
if states.is_empty() {
3510+
return Ok(false);
3511+
}
3512+
Ok(states
3513+
.iter()
3514+
.all(|state| state.get_tx_replay_set().is_none()))
3515+
})
3516+
.expect("Unable to confirm tx replay state");
35263517

35273518
signer_test.shutdown();
35283519
}

0 commit comments

Comments
 (0)