@@ -1745,7 +1745,7 @@ fn restarting_miner() {
1745
1745
naka_proposed_blocks : proposals_submitted_2,
1746
1746
..
1747
1747
} = run_loop_2. counters ( ) ;
1748
- let rl2_counters = run_loop . counters ( ) ;
1748
+ let rl2_counters = run_loop_2 . counters ( ) ;
1749
1749
1750
1750
let run_loop_thread = thread:: spawn ( move || run_loop. start ( None , 0 ) ) ;
1751
1751
wait_for_runloop ( & blocks_processed) ;
@@ -1832,13 +1832,16 @@ fn restarting_miner() {
1832
1832
let tip = NakamotoChainState :: get_canonical_block_header ( chainstate. db ( ) , & sortdb)
1833
1833
. unwrap ( )
1834
1834
. unwrap ( ) ;
1835
- Ok ( tip. stacks_block_height > last_tip. stacks_block_height )
1835
+ let stacks_tip_committed_to = rl2_counters
1836
+ . naka_submitted_commit_last_stacks_tip
1837
+ . load ( Ordering :: SeqCst ) ;
1838
+ Ok ( tip. stacks_block_height > last_tip. stacks_block_height
1839
+ && stacks_tip_committed_to > last_tip. stacks_block_height )
1836
1840
} )
1837
1841
. unwrap_or_else ( |e| {
1838
1842
let tip = NakamotoChainState :: get_canonical_block_header ( chainstate. db ( ) , & sortdb)
1839
1843
. unwrap ( )
1840
1844
. unwrap ( ) ;
1841
-
1842
1845
error ! (
1843
1846
"Failed to get a new block after restart" ;
1844
1847
"last_tip_height" => last_tip. stacks_block_height,
@@ -10043,8 +10046,7 @@ fn test_shadow_recovery() {
10043
10046
10044
10047
// revive ATC-C by waiting for commits
10045
10048
for _i in 0 ..4 {
10046
- btc_regtest_controller. bootstrap_chain ( 1 ) ;
10047
- sleep_ms ( 30_000 ) ;
10049
+ next_block_and_commits_only ( btc_regtest_controller, 60 , & naka_conf, & counters) . unwrap ( ) ;
10048
10050
}
10049
10051
10050
10052
// make another tenure
0 commit comments