Skip to content

Commit 8341d77

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

File tree

1 file changed

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

1 file changed

+10
-7
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3237,13 +3237,16 @@ fn tx_replay_forking_test() {
32373237

32383238
// Now, make a new stacks block, which should clear the tx replay set
32393239
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");
32473250

32483251
// Now, we'll trigger another fork, with more txs, across tenures
32493252

0 commit comments

Comments
 (0)