File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
testnet/stacks-node/src/nakamoto_node Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1201,11 +1201,14 @@ impl BlockMinerThread {
1201
1201
}
1202
1202
1203
1203
/// Check if the tenure needs to change -- if so, return a BurnchainTipChanged error
1204
+ /// The tenure should change if there is a new burnchain tip with a valid sortition
1204
1205
fn check_burn_tip_changed ( & self , sortdb : & SortitionDB ) -> Result < ( ) , NakamotoNodeError > {
1205
1206
let cur_burn_chain_tip = SortitionDB :: get_canonical_burn_chain_tip ( sortdb. conn ( ) )
1206
1207
. expect ( "FATAL: failed to query sortition DB for canonical burn chain tip" ) ;
1207
1208
1208
- if cur_burn_chain_tip. consensus_hash != self . burn_block . consensus_hash {
1209
+ if cur_burn_chain_tip. consensus_hash != self . burn_block . consensus_hash
1210
+ && cur_burn_chain_tip. sortition_id != self . burn_block . sortition_id
1211
+ {
1209
1212
info ! ( "Miner: Cancel block assembly; burnchain tip has changed" ) ;
1210
1213
self . globals . counters . bump_missed_tenures ( ) ;
1211
1214
Err ( NakamotoNodeError :: BurnchainTipChanged )
You can’t perform that action at this time.
0 commit comments