Skip to content

Commit b995e27

Browse files
committed
chore: fix signer_set_rollover test
1 parent cdb5394 commit b995e27

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

stackslib/src/core/mempool.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,11 +2659,7 @@ impl MemPoolDB {
26592659
Ok(())
26602660
}
26612661

2662-
/// Drop and blacklist transactions, so we don't re-broadcast them or re-fetch them.
2663-
/// Do *NOT* remove them from the bloom filter. This will cause them to continue to be
2664-
/// reported as present, which is exactly what we want because we don't want these transactions
2665-
/// to be seen again (so we don't want anyone accidentally "helpfully" pushing them to us, nor
2666-
/// do we want the mempool sync logic to "helpfully" re-discover and re-download them).
2662+
/// Update the time estimates for the supplied txs in the mempool db
26672663
pub fn update_tx_time_estimates(&mut self, txs: &[(Txid, u64)]) -> Result<(), db_error> {
26682664
let sql = "UPDATE mempool SET time_estimate_ms = ? WHERE txid = ?";
26692665
let mempool_tx = self.tx_begin()?;

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2974,6 +2974,7 @@ fn signer_set_rollover() {
29742974
.running_nodes
29752975
.btc_regtest_controller
29762976
.get_headers_height();
2977+
let accounts_to_check: Vec<_> = new_signer_private_keys.iter().map(tests::to_addr).collect();
29772978
for stacker_sk in new_signer_private_keys.iter() {
29782979
let pox_addr = PoxAddress::from_legacy(
29792980
AddressHashMode::SerializeP2PKH,
@@ -3017,6 +3018,13 @@ fn signer_set_rollover() {
30173018
submit_tx(&http_origin, &stacking_tx);
30183019
}
30193020

3021+
wait_for(60, || {
3022+
Ok(accounts_to_check
3023+
.iter()
3024+
.all(|acct| get_account(&http_origin, acct).nonce >= 1))
3025+
})
3026+
.expect("Timed out waiting for stacking txs to be mined");
3027+
30203028
signer_test.mine_nakamoto_block(short_timeout);
30213029

30223030
let next_reward_cycle = reward_cycle.saturating_add(1);

0 commit comments

Comments
 (0)