Skip to content

Commit c50dff8

Browse files
committed
chore: use 231 for default epoch25/epoch30 transition in int tests, customize for mock_signing
1 parent e66b39a commit c50dff8

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

testnet/stacks-node/src/tests/nakamoto_integrations.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,13 @@ lazy_static! {
167167
StacksEpoch {
168168
epoch_id: StacksEpochId::Epoch25,
169169
start_height: 201,
170-
end_height: 251,
170+
end_height: 231,
171171
block_limit: HELIUM_BLOCK_LIMIT_20.clone(),
172172
network_epoch: PEER_VERSION_EPOCH_2_5
173173
},
174174
StacksEpoch {
175175
epoch_id: StacksEpochId::Epoch30,
176-
start_height: 251,
176+
start_height: 231,
177177
end_height: STACKS_EPOCH_MAX,
178178
block_limit: HELIUM_BLOCK_LIMIT_20.clone(),
179179
network_epoch: PEER_VERSION_EPOCH_3_0

testnet/stacks-node/src/tests/signer/v0.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// You should have received a copy of the GNU General Public License
1414
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1515

16-
use std::str::FromStr;
1716
use std::ops::Add;
17+
use std::str::FromStr;
1818
use std::sync::atomic::Ordering;
1919
use std::time::{Duration, Instant};
2020
use std::{env, thread};
@@ -1566,6 +1566,8 @@ fn empty_sortition() {
15661566
// make the duration long enough that the miner will be marked as malicious
15671567
config.block_proposal_timeout = block_proposal_timeout;
15681568
},
1569+
|_| {},
1570+
&[],
15691571
);
15701572
let http_origin = format!("http://{}", &signer_test.running_nodes.conf.node.rpc_bind);
15711573
let short_timeout = Duration::from_secs(20);
@@ -1709,10 +1711,23 @@ fn mock_sign_epoch_25() {
17091711
let send_amt = 100;
17101712
let send_fee = 180;
17111713

1712-
let mut signer_test: SignerTest<SpawnedSigner> = SignerTest::new(
1714+
let mut signer_test: SignerTest<SpawnedSigner> = SignerTest::new_with_config_modifications(
17131715
num_signers,
17141716
vec![(sender_addr.clone(), send_amt + send_fee)],
17151717
Some(Duration::from_secs(5)),
1718+
|_| {},
1719+
|node_config| {
1720+
let epochs = node_config.burnchain.epochs.as_mut().unwrap();
1721+
for epoch in epochs.iter_mut() {
1722+
if epoch.epoch_id == StacksEpochId::Epoch25 {
1723+
epoch.end_height = 251;
1724+
}
1725+
if epoch.epoch_id == StacksEpochId::Epoch30 {
1726+
epoch.start_height = 251;
1727+
}
1728+
}
1729+
},
1730+
&[],
17161731
);
17171732

17181733
let epochs = signer_test

0 commit comments

Comments
 (0)