File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments