@@ -3237,13 +3237,16 @@ fn tx_replay_forking_test() {
3237
3237
3238
3238
// Now, make a new stacks block, which should clear the tx replay set
3239
3239
signer_test.mine_nakamoto_block(Duration::from_secs(30), true);
3240
- let (signer_states, _) = signer_test.get_burn_updated_states();
3241
- for state in signer_states {
3242
- assert!(
3243
- state.get_tx_replay_set().is_none(),
3244
- "Signer state is in tx replay state, when it shouldn't be"
3245
- );
3246
- }
3240
+ wait_for(30, || {
3241
+ let (states, _) = signer_test.get_burn_updated_states();
3242
+ if states.is_empty() {
3243
+ return Ok(false);
3244
+ }
3245
+ Ok(states
3246
+ .iter()
3247
+ .all(|state| state.get_tx_replay_set().is_none()))
3248
+ })
3249
+ .expect("Unable to confirm tx replay state");
3247
3250
3248
3251
// Now, we'll trigger another fork, with more txs, across tenures
3249
3252
@@ -3504,25 +3507,16 @@ fn tx_replay_rejected_when_forking_across_reward_cycle() {
3504
3507
assert_eq!(0, post_fork_tx_nonce);
3505
3508
3506
3509
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
- }
3510
+ wait_for(30, || {
3511
+ let (states, _) = signer_test.get_burn_updated_states();
3512
+ if states.is_empty() {
3513
+ return Ok(false);
3514
+ }
3515
+ Ok(states
3516
+ .iter()
3517
+ .all(|state| state.get_tx_replay_set().is_none()))
3518
+ })
3519
+ .expect("Unable to confirm tx replay state");
3526
3520
3527
3521
signer_test.shutdown();
3528
3522
}
0 commit comments