@@ -26,7 +26,7 @@ use stacks::chainstate::stacks::StacksBlockHeader;
2626use stacks:: clarity_cli:: vm_execute as execute;
2727use stacks:: config:: { Config , InitialBalance } ;
2828use stacks:: core:: test_util:: make_contract_call;
29- use stacks:: core:: { self , EpochList , BURNCHAIN_TX_SEARCH_WINDOW } ;
29+ use stacks:: core:: { self , EpochList , BURNCHAIN_TX_SEARCH_WINDOW , STACKS_EPOCH_MAX } ;
3030use stacks:: util_lib:: boot:: boot_code_id;
3131use stacks_common:: types:: chainstate:: {
3232 BlockHeaderHash , BurnchainHeaderHash , StacksAddress , StacksBlockId , VRFSeed ,
@@ -79,6 +79,8 @@ fn advance_to_2_1(
7979 epochs[ StacksEpochId :: Epoch2_05 ] . start_height = epoch_2_05;
8080 epochs[ StacksEpochId :: Epoch2_05 ] . end_height = epoch_2_1;
8181 epochs[ StacksEpochId :: Epoch21 ] . start_height = epoch_2_1;
82+ epochs[ StacksEpochId :: Epoch21 ] . end_height = STACKS_EPOCH_MAX ;
83+ epochs. truncate_after ( StacksEpochId :: Epoch21 ) ;
8284
8385 conf. burnchain . epochs = Some ( epochs) ;
8486
@@ -580,6 +582,8 @@ fn transition_fixes_bitcoin_rigidity() {
580582 epochs[ StacksEpochId :: Epoch2_05 ] . start_height = epoch_2_05;
581583 epochs[ StacksEpochId :: Epoch2_05 ] . end_height = epoch_2_1;
582584 epochs[ StacksEpochId :: Epoch21 ] . start_height = epoch_2_1;
585+ epochs[ StacksEpochId :: Epoch21 ] . end_height = STACKS_EPOCH_MAX ;
586+ epochs. truncate_after ( StacksEpochId :: Epoch21 ) ;
583587
584588 conf. burnchain . epochs = Some ( epochs) ;
585589
@@ -1476,6 +1480,8 @@ fn transition_removes_pox_sunset() {
14761480 epochs[ StacksEpochId :: Epoch2_05 ] . start_height = 1 ;
14771481 epochs[ StacksEpochId :: Epoch2_05 ] . end_height = epoch_21;
14781482 epochs[ StacksEpochId :: Epoch21 ] . start_height = epoch_21;
1483+ epochs[ StacksEpochId :: Epoch21 ] . end_height = STACKS_EPOCH_MAX ;
1484+ epochs. truncate_after ( StacksEpochId :: Epoch21 ) ;
14791485
14801486 conf. burnchain . epochs = Some ( epochs) ;
14811487
@@ -1731,6 +1737,8 @@ fn transition_empty_blocks() {
17311737 epochs[ StacksEpochId :: Epoch2_05 ] . start_height = epoch_2_05;
17321738 epochs[ StacksEpochId :: Epoch2_05 ] . end_height = epoch_2_1;
17331739 epochs[ StacksEpochId :: Epoch21 ] . start_height = epoch_2_1;
1740+ epochs[ StacksEpochId :: Epoch21 ] . end_height = STACKS_EPOCH_MAX ;
1741+ epochs. truncate_after ( StacksEpochId :: Epoch21 ) ;
17341742
17351743 conf. node . mine_microblocks = false ;
17361744 conf. burnchain . max_rbf = 1000000 ;
@@ -2006,6 +2014,8 @@ fn test_sortition_divergence_pre_21() {
20062014 epochs[ StacksEpochId :: Epoch2_05 ] . start_height = 101 ;
20072015 epochs[ StacksEpochId :: Epoch2_05 ] . end_height = 241 ;
20082016 epochs[ StacksEpochId :: Epoch21 ] . start_height = 241 ;
2017+ epochs[ StacksEpochId :: Epoch21 ] . end_height = STACKS_EPOCH_MAX ;
2018+ epochs. truncate_after ( StacksEpochId :: Epoch21 ) ;
20092019 conf_template. burnchain . epochs = Some ( epochs) ;
20102020
20112021 let privks: Vec < _ > = ( 0 ..5 ) . map ( |_| StacksPrivateKey :: random ( ) ) . collect ( ) ;
@@ -2438,6 +2448,8 @@ fn trait_invocation_cross_epoch() {
24382448 epochs[ StacksEpochId :: Epoch2_05 ] . start_height = epoch_2_05;
24392449 epochs[ StacksEpochId :: Epoch2_05 ] . end_height = epoch_2_1;
24402450 epochs[ StacksEpochId :: Epoch21 ] . start_height = epoch_2_1;
2451+ epochs[ StacksEpochId :: Epoch21 ] . end_height = STACKS_EPOCH_MAX ;
2452+ epochs. truncate_after ( StacksEpochId :: Epoch21 ) ;
24412453 conf. burnchain . epochs = Some ( epochs) ;
24422454
24432455 let mut burnchain_config = Burnchain :: regtest ( & conf. get_burn_db_path ( ) ) ;
@@ -2703,6 +2715,8 @@ fn test_v1_unlock_height_with_current_stackers() {
27032715 epochs[ StacksEpochId :: Epoch2_05 ] . start_height = epoch_2_05;
27042716 epochs[ StacksEpochId :: Epoch2_05 ] . end_height = epoch_2_1;
27052717 epochs[ StacksEpochId :: Epoch21 ] . start_height = epoch_2_1;
2718+ epochs[ StacksEpochId :: Epoch21 ] . end_height = STACKS_EPOCH_MAX ;
2719+ epochs. truncate_after ( StacksEpochId :: Epoch21 ) ;
27062720 conf. burnchain . epochs = Some ( epochs) ;
27072721
27082722 let mut burnchain_config = Burnchain :: regtest ( & conf. get_burn_db_path ( ) ) ;
@@ -2956,6 +2970,8 @@ fn test_v1_unlock_height_with_delay_and_current_stackers() {
29562970 epochs[ StacksEpochId :: Epoch2_05 ] . start_height = epoch_2_05;
29572971 epochs[ StacksEpochId :: Epoch2_05 ] . end_height = epoch_2_1;
29582972 epochs[ StacksEpochId :: Epoch21 ] . start_height = epoch_2_1;
2973+ epochs[ StacksEpochId :: Epoch21 ] . end_height = STACKS_EPOCH_MAX ;
2974+ epochs. truncate_after ( StacksEpochId :: Epoch21 ) ;
29592975 conf. burnchain . epochs = Some ( epochs) ;
29602976
29612977 let mut burnchain_config = Burnchain :: regtest ( & conf. get_burn_db_path ( ) ) ;
0 commit comments