@@ -1117,7 +1117,6 @@ impl<Z: SpawnedSignerTrait> SignerTest<Z> {
1117
1117
1118
1118
let commits_before = commits_submitted. load ( Ordering :: SeqCst ) ;
1119
1119
let commit_burn_height_before = commits_last_burn_height. load ( Ordering :: SeqCst ) ;
1120
- let commits_stacks_tip_before = commits_last_stacks_tip. load ( Ordering :: SeqCst ) ;
1121
1120
let mined_before = mined_blocks. load ( Ordering :: SeqCst ) ;
1122
1121
1123
1122
let mined_btc_block_time = Instant :: now ( ) ;
@@ -1141,17 +1140,23 @@ impl<Z: SpawnedSignerTrait> SignerTest<Z> {
1141
1140
info ! ( "Unpausing stacks block mining" ) ;
1142
1141
let mined_block_time = Instant :: now ( ) ;
1143
1142
TEST_MINE_SKIP . set ( false ) ;
1144
- // Ensure that the tenure change transaction is mined and that the subsequent block commit confirms it
1143
+ // Do these wait for's in two steps not only for increased timeout but for easier debugging.
1144
+ // Ensure that the tenure change transaction is mined
1145
1145
wait_for ( timeout. as_secs ( ) , || {
1146
- Ok ( commits_submitted. load ( Ordering :: SeqCst ) > commits_before
1147
- && commits_last_burn_height. load ( Ordering :: SeqCst ) > commit_burn_height_before
1148
- && commits_last_stacks_tip. load ( Ordering :: SeqCst ) > commits_stacks_tip_before
1149
- && get_chain_info ( & self . running_nodes . conf ) . stacks_tip_height
1150
- > info_before. stacks_tip_height
1146
+ Ok ( get_chain_info ( & self . running_nodes . conf ) . stacks_tip_height
1147
+ > info_before. stacks_tip_height
1151
1148
&& ( !use_nakamoto_blocks_mined
1152
1149
|| mined_blocks. load ( Ordering :: SeqCst ) > mined_before) )
1153
1150
} )
1154
1151
. expect ( "Failed to mine Tenure Change block" ) ;
1152
+ // Ensure the subsequent block commit confirms the previous Tenure Change block
1153
+ let stacks_tip_height = get_chain_info ( & self . running_nodes . conf ) . stacks_tip_height ;
1154
+ wait_for ( timeout. as_secs ( ) , || {
1155
+ Ok ( commits_submitted. load ( Ordering :: SeqCst ) > commits_before
1156
+ && commits_last_burn_height. load ( Ordering :: SeqCst ) > commit_burn_height_before
1157
+ && commits_last_stacks_tip. load ( Ordering :: SeqCst ) >= stacks_tip_height)
1158
+ } )
1159
+ . expect ( "Failed to update Block Commit" ) ;
1155
1160
info ! (
1156
1161
"Nakamoto block mine time elapsed: {:?}" ,
1157
1162
mined_block_time. elapsed( )
0 commit comments