Skip to content

Commit e64de15

Browse files
committed
Only return BurnchainTipChanged error iff the sortition id also changed
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent 2ef3ef3 commit e64de15

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl BlockMinerThread {
383383
"block_height" => new_block.header.chain_length,
384384
"consensus_hash" => %new_block.header.consensus_hash,
385385
);
386-
continue;
386+
return Err(e);
387387
}
388388
_ => {
389389
error!("Error while gathering signatures: {e:?}. Will try mining again.";

testnet/stacks-node/src/neon_node.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4324,7 +4324,9 @@ impl ParentStacksBlockInfo {
43244324
let burn_chain_tip = SortitionDB::get_canonical_burn_chain_tip(burn_db.conn())
43254325
.expect("FATAL: failed to query sortition DB for canonical burn chain tip");
43264326

4327-
if burn_chain_tip.consensus_hash != check_burn_block.consensus_hash {
4327+
if burn_chain_tip.consensus_hash != check_burn_block.consensus_hash
4328+
&& burn_chain_tip.sortition_id != check_burn_block.sortition_id
4329+
{
43284330
info!(
43294331
"New canonical burn chain tip detected. Will not try to mine.";
43304332
"new_consensus_hash" => %burn_chain_tip.consensus_hash,

0 commit comments

Comments
 (0)