@@ -2728,13 +2728,9 @@ fn empty_sortition_before_approval() {
2728
2728
info ! ( "Found tenure extend block" ) ;
2729
2729
return Ok ( true ) ;
2730
2730
}
2731
- TenureChangeCause :: BlockFound => {
2732
- info ! ( "Found block with tenure change" ) ;
2733
- }
2731
+ TenureChangeCause :: BlockFound => { }
2734
2732
} ,
2735
- payload => {
2736
- info ! ( "Found tx with payload: {:?}" , payload) ;
2737
- }
2733
+ _ => { }
2738
2734
} ;
2739
2735
}
2740
2736
Ok ( false )
@@ -2834,13 +2830,21 @@ fn empty_sortition_before_proposal() {
2834
2830
info ! ( "Pause miner so it doesn't propose a block before the next tenure arrives" ) ;
2835
2831
TEST_MINE_STALL . lock ( ) . unwrap ( ) . replace ( true ) ;
2836
2832
2833
+ let burn_height_before = get_chain_info ( & signer_test. running_nodes . conf ) . burn_block_height ;
2834
+
2837
2835
info ! ( "------------------------- Test Mine Tenure A and B -------------------------" ) ;
2838
2836
signer_test
2839
2837
. running_nodes
2840
2838
. btc_regtest_controller
2841
2839
. build_next_block ( 2 ) ;
2842
2840
2843
- // Sleep to ensure the signers see both burn blocks
2841
+ wait_for ( 60 , || {
2842
+ let info = get_chain_info ( & signer_test. running_nodes . conf ) ;
2843
+ Ok ( info. burn_block_height == burn_height_before + 2 )
2844
+ } )
2845
+ . expect ( "Failed to advance chain tip" ) ;
2846
+
2847
+ // Sleep a bit more to ensure the signers see both burn blocks
2844
2848
sleep_ms ( 5_000 ) ;
2845
2849
2846
2850
info ! ( "Unpause miner" ) ;
@@ -2882,13 +2886,9 @@ fn empty_sortition_before_proposal() {
2882
2886
info ! ( "Found tenure extend block" ) ;
2883
2887
return Ok ( true ) ;
2884
2888
}
2885
- TenureChangeCause :: BlockFound => {
2886
- info ! ( "Found block with tenure change" ) ;
2887
- }
2889
+ TenureChangeCause :: BlockFound => { }
2888
2890
} ,
2889
- payload => {
2890
- info ! ( "Found tx with payload: {:?}" , payload) ;
2891
- }
2891
+ _ => { }
2892
2892
} ;
2893
2893
}
2894
2894
Ok ( false )
0 commit comments