@@ -85,8 +85,9 @@ use crate::tests::nakamoto_integrations::{
85
85
POX_4_DEFAULT_STACKER_BALANCE , POX_4_DEFAULT_STACKER_STX_AMT ,
86
86
} ;
87
87
use crate :: tests:: neon_integrations:: {
88
- get_account, get_chain_info, get_chain_info_opt, get_sortition_info, get_sortition_info_ch,
89
- next_block_and_wait, run_until_burnchain_height, submit_tx, submit_tx_fallible, test_observer,
88
+ get_account, get_chain_info, get_chain_info_opt, get_pox_info, get_sortition_info,
89
+ get_sortition_info_ch, next_block_and_wait, run_until_burnchain_height, submit_tx,
90
+ submit_tx_fallible, test_observer,
90
91
} ;
91
92
use crate :: tests:: {
92
93
self , gen_random_port, make_contract_call, make_contract_publish, make_stacks_transfer,
@@ -11729,6 +11730,15 @@ fn multiple_miners_empty_sortition() {
11729
11730
let last_active_sortition = get_sortition_info ( & conf) ;
11730
11731
assert ! ( last_active_sortition. was_sortition) ;
11731
11732
11733
+ // check if we're about to cross a reward cycle boundary -- if so, we can't
11734
+ // perform this test, because we can't tenure extend across the boundary
11735
+ let pox_info = get_pox_info ( & conf. node . data_url ) . unwrap ( ) ;
11736
+ let blocks_until_next_cycle = pox_info. next_cycle . blocks_until_reward_phase ;
11737
+ if blocks_until_next_cycle == 1 {
11738
+ info ! ( "We're about to cross a reward cycle boundary, cannot perform a tenure extend here!" ) ;
11739
+ continue ;
11740
+ }
11741
+
11732
11742
// lets mine a btc flash block
11733
11743
let rl2_commits_before = rl2_commits. load ( Ordering :: SeqCst ) ;
11734
11744
let rl1_commits_before = rl1_commits. load ( Ordering :: SeqCst ) ;
0 commit comments