@@ -74,10 +74,10 @@ fn advance_to_2_1(
74
74
test_observer:: register_any ( & mut conf) ;
75
75
76
76
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
77
- epochs[ 1 ] . end_height = epoch_2_05;
78
- epochs[ 2 ] . start_height = epoch_2_05;
79
- epochs[ 2 ] . end_height = epoch_2_1;
80
- epochs[ 3 ] . start_height = epoch_2_1;
77
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = epoch_2_05;
78
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = epoch_2_05;
79
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = epoch_2_1;
80
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = epoch_2_1;
81
81
82
82
conf. burnchain . epochs = Some ( epochs) ;
83
83
@@ -577,10 +577,10 @@ fn transition_fixes_bitcoin_rigidity() {
577
577
test_observer:: register_any ( & mut conf) ;
578
578
579
579
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
580
- epochs[ 1 ] . end_height = epoch_2_05;
581
- epochs[ 2 ] . start_height = epoch_2_05;
582
- epochs[ 2 ] . end_height = epoch_2_1;
583
- epochs[ 3 ] . start_height = epoch_2_1;
580
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = epoch_2_05;
581
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = epoch_2_05;
582
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = epoch_2_1;
583
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = epoch_2_1;
584
584
585
585
conf. burnchain . epochs = Some ( epochs) ;
586
586
@@ -1497,10 +1497,10 @@ fn transition_removes_pox_sunset() {
1497
1497
let epoch_21 = epoch_21_rc * reward_cycle_len + 1 ;
1498
1498
1499
1499
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
1500
- epochs[ 1 ] . end_height = 1 ;
1501
- epochs[ 2 ] . start_height = 1 ;
1502
- epochs[ 2 ] . end_height = epoch_21;
1503
- epochs[ 3 ] . start_height = epoch_21;
1500
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = 1 ;
1501
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = 1 ;
1502
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = epoch_21;
1503
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = epoch_21;
1504
1504
1505
1505
conf. burnchain . epochs = Some ( epochs) ;
1506
1506
@@ -1770,10 +1770,10 @@ fn transition_empty_blocks() {
1770
1770
let ( mut conf, miner_account) = neon_integration_test_conf ( ) ;
1771
1771
1772
1772
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
1773
- epochs[ 1 ] . end_height = epoch_2_05;
1774
- epochs[ 2 ] . start_height = epoch_2_05;
1775
- epochs[ 2 ] . end_height = epoch_2_1;
1776
- epochs[ 3 ] . start_height = epoch_2_1;
1773
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = epoch_2_05;
1774
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = epoch_2_05;
1775
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = epoch_2_1;
1776
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = epoch_2_1;
1777
1777
1778
1778
conf. node . mine_microblocks = false ;
1779
1779
conf. burnchain . max_rbf = 1000000 ;
@@ -2051,10 +2051,10 @@ fn test_pox_reorgs_three_flaps() {
2051
2051
2052
2052
// make epoch 2.1 start in the middle of boot-up
2053
2053
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
2054
- epochs[ 1 ] . end_height = 101 ;
2055
- epochs[ 2 ] . start_height = 101 ;
2056
- epochs[ 2 ] . end_height = 151 ;
2057
- epochs[ 3 ] . start_height = 151 ;
2054
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = 101 ;
2055
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = 101 ;
2056
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = 151 ;
2057
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = 151 ;
2058
2058
conf_template. burnchain . epochs = Some ( epochs) ;
2059
2059
2060
2060
let privks: Vec < _ > = ( 0 ..5 )
@@ -2593,10 +2593,10 @@ fn test_pox_reorg_one_flap() {
2593
2593
2594
2594
// make epoch 2.1 start in the middle of boot-up
2595
2595
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
2596
- epochs[ 1 ] . end_height = 101 ;
2597
- epochs[ 2 ] . start_height = 101 ;
2598
- epochs[ 2 ] . end_height = 151 ;
2599
- epochs[ 3 ] . start_height = 151 ;
2596
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = 101 ;
2597
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = 101 ;
2598
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = 151 ;
2599
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = 151 ;
2600
2600
conf_template. burnchain . epochs = Some ( epochs) ;
2601
2601
2602
2602
let privks: Vec < _ > = ( 0 ..5 )
@@ -3019,10 +3019,10 @@ fn test_pox_reorg_flap_duel() {
3019
3019
3020
3020
// make epoch 2.1 start in the middle of boot-up
3021
3021
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
3022
- epochs[ 1 ] . end_height = 101 ;
3023
- epochs[ 2 ] . start_height = 101 ;
3024
- epochs[ 2 ] . end_height = 151 ;
3025
- epochs[ 3 ] . start_height = 151 ;
3022
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = 101 ;
3023
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = 101 ;
3024
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = 151 ;
3025
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = 151 ;
3026
3026
conf_template. burnchain . epochs = Some ( epochs) ;
3027
3027
3028
3028
let privks: Vec < _ > = ( 0 ..5 )
@@ -3459,10 +3459,10 @@ fn test_pox_reorg_flap_reward_cycles() {
3459
3459
3460
3460
// make epoch 2.1 start in the middle of boot-up
3461
3461
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
3462
- epochs[ 1 ] . end_height = 101 ;
3463
- epochs[ 2 ] . start_height = 101 ;
3464
- epochs[ 2 ] . end_height = 151 ;
3465
- epochs[ 3 ] . start_height = 151 ;
3462
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = 101 ;
3463
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = 101 ;
3464
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = 151 ;
3465
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = 151 ;
3466
3466
conf_template. burnchain . epochs = Some ( epochs) ;
3467
3467
3468
3468
let privks: Vec < _ > = ( 0 ..5 )
@@ -3891,10 +3891,10 @@ fn test_pox_missing_five_anchor_blocks() {
3891
3891
3892
3892
// make epoch 2.1 start in the middle of boot-up
3893
3893
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
3894
- epochs[ 1 ] . end_height = 101 ;
3895
- epochs[ 2 ] . start_height = 101 ;
3896
- epochs[ 2 ] . end_height = 151 ;
3897
- epochs[ 3 ] . start_height = 151 ;
3894
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = 101 ;
3895
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = 101 ;
3896
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = 151 ;
3897
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = 151 ;
3898
3898
conf_template. burnchain . epochs = Some ( epochs) ;
3899
3899
3900
3900
let privks: Vec < _ > = ( 0 ..5 )
@@ -4291,10 +4291,10 @@ fn test_sortition_divergence_pre_21() {
4291
4291
4292
4292
// make epoch 2.1 start after we have created this error condition
4293
4293
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
4294
- epochs[ 1 ] . end_height = 101 ;
4295
- epochs[ 2 ] . start_height = 101 ;
4296
- epochs[ 2 ] . end_height = 241 ;
4297
- epochs[ 3 ] . start_height = 241 ;
4294
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = 101 ;
4295
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = 101 ;
4296
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = 241 ;
4297
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = 241 ;
4298
4298
conf_template. burnchain . epochs = Some ( epochs) ;
4299
4299
4300
4300
let privks: Vec < _ > = ( 0 ..5 )
@@ -4750,10 +4750,10 @@ fn trait_invocation_cross_epoch() {
4750
4750
conf. initial_balances . append ( & mut initial_balances) ;
4751
4751
test_observer:: register_any ( & mut conf) ;
4752
4752
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
4753
- epochs[ 1 ] . end_height = epoch_2_05;
4754
- epochs[ 2 ] . start_height = epoch_2_05;
4755
- epochs[ 2 ] . end_height = epoch_2_1;
4756
- epochs[ 3 ] . start_height = epoch_2_1;
4753
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = epoch_2_05;
4754
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = epoch_2_05;
4755
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = epoch_2_1;
4756
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = epoch_2_1;
4757
4757
conf. burnchain . epochs = Some ( epochs) ;
4758
4758
4759
4759
let mut burnchain_config = Burnchain :: regtest ( & conf. get_burn_db_path ( ) ) ;
@@ -5024,10 +5024,10 @@ fn test_v1_unlock_height_with_current_stackers() {
5024
5024
conf. initial_balances . append ( & mut initial_balances) ;
5025
5025
5026
5026
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
5027
- epochs[ 1 ] . end_height = epoch_2_05;
5028
- epochs[ 2 ] . start_height = epoch_2_05;
5029
- epochs[ 2 ] . end_height = epoch_2_1;
5030
- epochs[ 3 ] . start_height = epoch_2_1;
5027
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = epoch_2_05;
5028
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = epoch_2_05;
5029
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = epoch_2_1;
5030
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = epoch_2_1;
5031
5031
conf. burnchain . epochs = Some ( epochs) ;
5032
5032
5033
5033
let mut burnchain_config = Burnchain :: regtest ( & conf. get_burn_db_path ( ) ) ;
@@ -5287,10 +5287,10 @@ fn test_v1_unlock_height_with_delay_and_current_stackers() {
5287
5287
conf. initial_balances . append ( & mut initial_balances) ;
5288
5288
5289
5289
let mut epochs = core:: STACKS_EPOCHS_REGTEST . to_vec ( ) ;
5290
- epochs[ 1 ] . end_height = epoch_2_05;
5291
- epochs[ 2 ] . start_height = epoch_2_05;
5292
- epochs[ 2 ] . end_height = epoch_2_1;
5293
- epochs[ 3 ] . start_height = epoch_2_1;
5290
+ epochs[ StacksEpochId :: Epoch20 . index ( ) ] . end_height = epoch_2_05;
5291
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . start_height = epoch_2_05;
5292
+ epochs[ StacksEpochId :: Epoch2_05 . index ( ) ] . end_height = epoch_2_1;
5293
+ epochs[ StacksEpochId :: Epoch21 . index ( ) ] . start_height = epoch_2_1;
5294
5294
conf. burnchain . epochs = Some ( epochs) ;
5295
5295
5296
5296
let mut burnchain_config = Burnchain :: regtest ( & conf. get_burn_db_path ( ) ) ;
0 commit comments