Skip to content

Commit 4fd5c49

Browse files
committed
fix: switch back to default reward phase length for test
1 parent d7e32b3 commit 4fd5c49

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

stacks-node/src/tests/nakamoto_integrations.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ lazy_static! {
250250
// so any test that crosses it must first deploy the stub (see
251251
// `check_pox_5_stake_lifecycle` for the pattern). Tests that
252252
// *intentionally* exercise Epoch 4.0 override these heights — e.g.
253-
// `epochs[Epoch34].end_height = 254; epochs[Epoch40].start_height = 254;`.
253+
// `epochs[Epoch34].end_height = 260; epochs[Epoch40].start_height = 260;`.
254254
StacksEpoch {
255255
epoch_id: StacksEpochId::Epoch40,
256256
start_height: 1_000,
@@ -764,6 +764,9 @@ pub fn naka_neon_integration_conf(seed: Option<&[u8]>) -> (Config, StacksAddress
764764

765765
/// Activate Epoch 4.0 (inactive by default in `NAKAMOTO_INTEGRATION_EPOCHS`).
766766
/// Must be applied to every node's config so peers agree on the boundary.
767+
///
768+
/// The boundary is placed at `260` — the start of cycle 13 under the default
769+
/// integration-test PoX params (`reward_length=20`)..
767770
pub fn enable_epoch_4_0(conf: &mut Config) {
768771
let epochs = conf
769772
.burnchain
@@ -773,11 +776,11 @@ pub fn enable_epoch_4_0(conf: &mut Config) {
773776
epochs
774777
.get_mut(StacksEpochId::Epoch34)
775778
.expect("Missing epoch 3.4 in config")
776-
.end_height = 254;
779+
.end_height = 260;
777780
epochs
778781
.get_mut(StacksEpochId::Epoch40)
779782
.expect("Missing epoch 4.0 in config")
780-
.start_height = 254;
783+
.start_height = 260;
781784
}
782785

783786
pub fn next_block_and<F>(

stacks-node/src/tests/pox_5_integrations.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -807,24 +807,13 @@ fn check_pox_5_register_for_second_bond_no_downtime() {
807807
let mut signers = TestSigners::default();
808808
let (mut naka_conf, _miner_account) = naka_neon_integration_conf(None);
809809
enable_epoch_4_0(&mut naka_conf);
810-
// Shorten the reward cycle so the 12-cycle mine from bond 0's start into
811-
// bond 6's gap window stays tractable (~120 burn blocks vs ~240 at the
812-
// 20-block default), then adjust as needed to meet requirements.
813-
naka_conf.burnchain.pox_reward_length = Some(10);
814-
naka_conf.burnchain.pox_prepare_length = Some(3);
815-
{
816-
let epochs = naka_conf.burnchain.epochs.as_mut().unwrap();
817-
epochs[StacksEpochId::Epoch25].end_height = 225;
818-
epochs[StacksEpochId::Epoch30].start_height = 225;
819-
}
820810
let http_origin = format!("http://{}", &naka_conf.node.rpc_bind);
821811
naka_conf.burnchain.chain_id = CHAIN_ID_TESTNET + 1;
822812
let sender_sk = Secp256k1PrivateKey::random();
823-
let sender_signer_sk = Secp256k1PrivateKey::random();
824-
let sender_signer_addr = tests::to_addr(&sender_signer_sk);
825-
826813
let signer_sk = signers.signer_keys[0].clone();
827814
let signer_pk = StacksPublicKey::from_private(&signer_sk);
815+
let sender_signer_sk = signer_sk.clone();
816+
let sender_signer_addr = tests::to_addr(&sender_signer_sk);
828817

829818
let sender_addr = tests::to_addr(&sender_sk);
830819
let deploy_fee = 3000;

0 commit comments

Comments
 (0)