File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed
testnet/stacks-node/src/tests/signer Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -748,9 +748,22 @@ fn setup_stx_btc_node<G: FnMut(&mut NeonConfig) -> ()>(
748
748
info ! ( "Make new BitcoinRegtestController" ) ;
749
749
let mut btc_regtest_controller = BitcoinRegtestController :: new ( naka_conf. clone ( ) , None ) ;
750
750
751
- info ! ( "Bootstraping..." ) ;
752
- // Should be 201 for other tests?
753
- btc_regtest_controller. bootstrap_chain_to_pks ( 195 , btc_miner_pubkeys) ;
751
+ let epoch_2_5_start = usize:: try_from (
752
+ naka_conf
753
+ . burnchain
754
+ . epochs
755
+ . as_ref ( )
756
+ . unwrap ( )
757
+ . iter ( )
758
+ . find ( |epoch| epoch. epoch_id == StacksEpochId :: Epoch25 )
759
+ . unwrap ( )
760
+ . start_height ,
761
+ )
762
+ . expect ( "Failed to get epoch 2.5 start height" ) ;
763
+ let bootstrap_block = epoch_2_5_start - 6 ;
764
+
765
+ info ! ( "Bootstraping to block {bootstrap_block}..." ) ;
766
+ btc_regtest_controller. bootstrap_chain_to_pks ( bootstrap_block, btc_miner_pubkeys) ;
754
767
755
768
info ! ( "Chain bootstrapped..." ) ;
756
769
Original file line number Diff line number Diff line change @@ -3610,6 +3610,17 @@ fn partial_tenure_fork() {
3610
3610
config. node . local_peer_seed = btc_miner_1_seed. clone ( ) ;
3611
3611
config. burnchain . local_mining_public_key = Some ( btc_miner_1_pk. to_hex ( ) ) ;
3612
3612
config. miner . mining_key = Some ( Secp256k1PrivateKey :: from_seed ( & [ 1 ] ) ) ;
3613
+
3614
+ // Move epoch 2.5 and 3.0 earlier, so we have more time for the
3615
+ // test before re-stacking is required.
3616
+ if let Some ( epochs) = config. burnchain . epochs . as_mut ( ) {
3617
+ epochs[ 6 ] . end_height = 121 ;
3618
+ epochs[ 7 ] . start_height = 121 ;
3619
+ epochs[ 7 ] . end_height = 151 ;
3620
+ epochs[ 8 ] . start_height = 151 ;
3621
+ } else {
3622
+ panic ! ( "Expected epochs to be set" ) ;
3623
+ }
3613
3624
} ,
3614
3625
Some ( vec ! [ btc_miner_1_pk. clone( ) , btc_miner_2_pk. clone( ) ] ) ,
3615
3626
None ,
You can’t perform that action at this time.
0 commit comments