Skip to content

Commit 66a100f

Browse files
committed
fix: mock_miner_replay() integration tests works with new config method
1 parent 4a0dd95 commit 66a100f

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

stackslib/src/cli.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ pub fn drain_common_opts(argv: &mut Vec<String>, start_at: usize) -> CommonOpts
7474
while let Some(arg) = argv.get(i) {
7575
let (prefix, opt) = arg.split_at(2);
7676
if prefix != "--" {
77+
// No args left to take
7778
break;
7879
}
80+
// "Take" arg
7981
i += 1;
8082
match opt {
8183
"config" => {

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

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use std::sync::{mpsc, Arc};
55
use std::time::{Duration, Instant};
66
use std::{cmp, env, fs, io, thread};
77

8-
use clarity::consts::BITCOIN_REGTEST_FIRST_BLOCK_TIMESTAMP;
98
use clarity::vm::ast::stack_depth_checker::AST_CALL_STACK_DEPTH_BUFFER;
109
use clarity::vm::ast::ASTRules;
1110
use clarity::vm::costs::ExecutionCost;
@@ -39,7 +38,7 @@ use stacks::chainstate::stacks::{
3938
StacksPublicKey, StacksTransaction, TransactionContractCall, TransactionPayload,
4039
};
4140
use stacks::clarity_cli::vm_execute as execute;
42-
use stacks::cli::{self, StacksChainConfig};
41+
use stacks::cli;
4342
use stacks::codec::StacksMessageCodec;
4443
use stacks::config::{EventKeyType, EventObserverConfig, FeeEstimatorName, InitialBalance};
4544
use stacks::core::mempool::MemPoolWalkTxTypes;
@@ -12691,22 +12690,9 @@ fn mock_miner_replay() {
1269112690
let blocks_dir = blocks_dir.into_os_string().into_string().unwrap();
1269212691
let db_path = format!("{}/neon", conf.node.working_dir);
1269312692
let args: Vec<String> = vec!["replay-mock-mining".into(), db_path, blocks_dir];
12694-
let SortitionDB {
12695-
first_block_height,
12696-
first_burn_header_hash,
12697-
..
12698-
} = *btc_regtest_controller.sortdb_mut();
12699-
let replay_config = StacksChainConfig {
12700-
chain_id: conf.burnchain.chain_id,
12701-
first_block_height,
12702-
first_burn_header_hash,
12703-
first_burn_header_timestamp: BITCOIN_REGTEST_FIRST_BLOCK_TIMESTAMP.into(),
12704-
pox_constants: burnchain_config.pox_constants,
12705-
epochs: conf.burnchain.epochs.expect("Missing `epochs` in config"),
12706-
};
1270712693

1270812694
info!("Replaying mock mined blocks...");
12709-
cli::command_replay_mock_mining(&args, Some(&replay_config));
12695+
cli::command_replay_mock_mining(&args, Some(&conf));
1271012696

1271112697
// ---------- Test finished, clean up ----------
1271212698

0 commit comments

Comments
 (0)