Skip to content

Commit 2b9dd3f

Browse files
committed
address PR feedback
1 parent b7ebbfc commit 2b9dd3f

File tree

1 file changed

+5
-7
lines changed
  • testnet/stacks-node/src/nakamoto_node

1 file changed

+5
-7
lines changed

testnet/stacks-node/src/nakamoto_node/miner.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,13 +1408,11 @@ impl ParentStacksBlockInfo {
14081408
let burn_chain_tip = SortitionDB::get_canonical_burn_chain_tip(burn_db.conn())
14091409
.expect("FATAL: failed to query sortition DB for canonical burn chain tip");
14101410

1411-
let allow_late = if let MinerReason::BlockFound { late } = reason {
1412-
*late
1413-
} else {
1414-
false
1415-
};
1416-
1417-
if !allow_late && burn_chain_tip.consensus_hash != check_burn_block.consensus_hash {
1411+
// if we're mining a tenure that we were late to initialize, allow the burn tipped
1412+
// to be slightly stale
1413+
if !reason.is_late_block()
1414+
&& burn_chain_tip.consensus_hash != check_burn_block.consensus_hash
1415+
{
14181416
info!(
14191417
"New canonical burn chain tip detected. Will not try to mine.";
14201418
"new_consensus_hash" => %burn_chain_tip.consensus_hash,

0 commit comments

Comments
 (0)