Skip to content

Commit

Permalink
chore: use 231 for default epoch25/epoch30 transition in int tests, c…
Browse files Browse the repository at this point in the history
…ustomize for mock_signing
  • Loading branch information
kantai committed Jul 31, 2024
1 parent e66b39a commit c50dff8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions testnet/stacks-node/src/tests/nakamoto_integrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ lazy_static! {
StacksEpoch {
epoch_id: StacksEpochId::Epoch25,
start_height: 201,
end_height: 251,
end_height: 231,
block_limit: HELIUM_BLOCK_LIMIT_20.clone(),
network_epoch: PEER_VERSION_EPOCH_2_5
},
StacksEpoch {
epoch_id: StacksEpochId::Epoch30,
start_height: 251,
start_height: 231,
end_height: STACKS_EPOCH_MAX,
block_limit: HELIUM_BLOCK_LIMIT_20.clone(),
network_epoch: PEER_VERSION_EPOCH_3_0
Expand Down
19 changes: 17 additions & 2 deletions testnet/stacks-node/src/tests/signer/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

use std::str::FromStr;
use std::ops::Add;
use std::str::FromStr;
use std::sync::atomic::Ordering;
use std::time::{Duration, Instant};
use std::{env, thread};
Expand Down Expand Up @@ -1566,6 +1566,8 @@ fn empty_sortition() {
// make the duration long enough that the miner will be marked as malicious
config.block_proposal_timeout = block_proposal_timeout;
},
|_| {},
&[],
);
let http_origin = format!("http://{}", &signer_test.running_nodes.conf.node.rpc_bind);
let short_timeout = Duration::from_secs(20);
Expand Down Expand Up @@ -1709,10 +1711,23 @@ fn mock_sign_epoch_25() {
let send_amt = 100;
let send_fee = 180;

let mut signer_test: SignerTest<SpawnedSigner> = SignerTest::new(
let mut signer_test: SignerTest<SpawnedSigner> = SignerTest::new_with_config_modifications(
num_signers,
vec![(sender_addr.clone(), send_amt + send_fee)],
Some(Duration::from_secs(5)),
|_| {},
|node_config| {
let epochs = node_config.burnchain.epochs.as_mut().unwrap();
for epoch in epochs.iter_mut() {
if epoch.epoch_id == StacksEpochId::Epoch25 {
epoch.end_height = 251;
}
if epoch.epoch_id == StacksEpochId::Epoch30 {
epoch.start_height = 251;
}
}
},
&[],
);

let epochs = signer_test
Expand Down

0 comments on commit c50dff8

Please sign in to comment.