File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
testnet/stacks-node/src/nakamoto_node Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -660,15 +660,6 @@ impl BlockMinerThread {
660
660
self . mined_blocks += 1 ;
661
661
}
662
662
663
- let Ok ( sort_db) = SortitionDB :: open (
664
- & self . config . get_burn_db_file_path ( ) ,
665
- true ,
666
- self . burnchain . pox_constants . clone ( ) ,
667
- ) else {
668
- error ! ( "Failed to open sortition DB. Will try mining again." ) ;
669
- return Ok ( ( ) ) ;
670
- } ;
671
-
672
663
if let Some ( last_block_mined) = & self . last_block_mined {
673
664
// Wait until the last block mined has been processed
674
665
loop {
@@ -685,6 +676,16 @@ impl BlockMinerThread {
685
676
}
686
677
687
678
thread:: sleep ( Duration :: from_millis ( ABORT_TRY_AGAIN_MS ) ) ;
679
+
680
+ // Check if the burnchain tip has changed
681
+ let Ok ( sort_db) = SortitionDB :: open (
682
+ & self . config . get_burn_db_file_path ( ) ,
683
+ false ,
684
+ self . burnchain . pox_constants . clone ( ) ,
685
+ ) else {
686
+ error ! ( "Failed to open sortition DB. Will try mining again." ) ;
687
+ return Ok ( ( ) ) ;
688
+ } ;
688
689
if self . check_burn_tip_changed ( & sort_db) . is_err ( ) {
689
690
return Err ( NakamotoNodeError :: BurnchainTipChanged ) ;
690
691
}
You can’t perform that action at this time.
0 commit comments