Skip to content

Commit d63c0ef

Browse files
committed
fix nakamoto_integrations test assertion broken by boot contract publish events
1 parent 86282a6 commit d63c0ef

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

stacks-node/src/tests/nakamoto_integrations.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,19 @@ pub fn check_nakamoto_empty_block_heuristics(mainnet: bool) {
317317
)
318318
});
319319
if has_tenure_change {
320-
let only_coinbase_and_tenure_change = txs.iter().all(|tx| {
321-
matches!(
320+
for tx in txs.iter() {
321+
if tx.get_origin().address_testnet().is_boot_code_addr() {
322+
// boot code txs are okay
323+
continue;
324+
}
325+
if !matches!(
322326
tx.payload,
323327
TransactionPayload::TenureChange(_) | TransactionPayload::Coinbase(..)
324-
)
325-
});
326-
assert!(only_coinbase_and_tenure_change, "Nakamoto blocks with a tenure change in them should only have coinbase or tenure changes");
328+
) {
329+
error!("Nakamoto TenureChange(BlockFound) block should only have coinbase and tenure change txs, but found tx: {tx:?}");
330+
panic!("Nakamoto TenureChange(BlockFound) block should only have coinbase and tenure change txs");
331+
}
332+
}
327333
}
328334
}
329335
}

0 commit comments

Comments
 (0)