@@ -18,9 +18,7 @@ use std::sync::LazyLock;
1818use clarity:: boot_util:: boot_code_addr;
1919use clarity:: codec:: StacksMessageCodec ;
2020use clarity:: consts:: {
21- CHAIN_ID_TESTNET , PEER_VERSION_EPOCH_1_0 , PEER_VERSION_EPOCH_2_0 , PEER_VERSION_EPOCH_2_05 ,
22- PEER_VERSION_EPOCH_2_1 , PEER_VERSION_EPOCH_2_2 , PEER_VERSION_EPOCH_2_3 , PEER_VERSION_EPOCH_2_4 ,
23- PEER_VERSION_EPOCH_2_5 , PEER_VERSION_EPOCH_3_0 , PEER_VERSION_EPOCH_3_1 , PEER_VERSION_EPOCH_3_2 ,
21+ CHAIN_ID_TESTNET ,
2422 STACKS_EPOCH_MAX ,
2523} ;
2624use clarity:: types:: chainstate:: {
@@ -227,7 +225,8 @@ pub struct TestBlock {
227225
228226/// Manages a `TestChainstate` tailored for consensus-rule verification.
229227///
230- /// Initialises the chain with enough burn-chain blocks per epoch to run the requested Stacks blocks.
228+ /// Initialises the chain with enough burn-chain blocks per epoch to run
229+ /// the requested number of Stacks blocks per epoch.
231230///
232231/// Provides high-level helpers for:
233232/// - Appending Nakamoto or pre-Nakamoto blocks
@@ -393,19 +392,7 @@ impl ConsensusChain<'_> {
393392 } else {
394393 BLOCK_LIMIT_MAINNET_21 . clone ( )
395394 } ;
396- let network_epoch = match * epoch_id {
397- StacksEpochId :: Epoch10 => PEER_VERSION_EPOCH_1_0 ,
398- StacksEpochId :: Epoch20 => PEER_VERSION_EPOCH_2_0 ,
399- StacksEpochId :: Epoch2_05 => PEER_VERSION_EPOCH_2_05 ,
400- StacksEpochId :: Epoch21 => PEER_VERSION_EPOCH_2_1 ,
401- StacksEpochId :: Epoch22 => PEER_VERSION_EPOCH_2_2 ,
402- StacksEpochId :: Epoch23 => PEER_VERSION_EPOCH_2_3 ,
403- StacksEpochId :: Epoch24 => PEER_VERSION_EPOCH_2_4 ,
404- StacksEpochId :: Epoch25 => PEER_VERSION_EPOCH_2_5 ,
405- StacksEpochId :: Epoch30 => PEER_VERSION_EPOCH_3_0 ,
406- StacksEpochId :: Epoch31 => PEER_VERSION_EPOCH_3_1 ,
407- StacksEpochId :: Epoch32 | StacksEpochId :: Epoch33 => PEER_VERSION_EPOCH_3_2 ,
408- } ;
395+ let network_epoch = StacksEpochId :: network_epoch ( * epoch_id) ;
409396 epochs. push ( StacksEpoch {
410397 epoch_id : * epoch_id,
411398 start_height,
0 commit comments