Skip to content

Commit 47ec2d4

Browse files
committed
add comment for closing late blockfound tenure
1 parent 137dcf0 commit 47ec2d4

File tree

1 file changed

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

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,11 @@ impl BlockMinerThread {
443443
"Failed to open chainstate DB. Cannot mine! {e:?}"
444444
))
445445
})?;
446+
// Late block tenures are initiated only to issue the BlockFound
447+
// tenure change tx (because they can be immediately extended to
448+
// the next burn view). This checks whether or not we're in such a
449+
// tenure and have produced a block already. If so, it exits the
450+
// mining thread to allow the tenure extension thread to take over.
446451
if self.last_block_mined.is_some() && self.reason.is_late_block() {
447452
info!("Miner: finished mining a late tenure");
448453
return Err(NakamotoNodeError::StacksTipChanged);

0 commit comments

Comments
 (0)