Skip to content

Commit b3da6cd

Browse files
committed
test: remove unsused mutable from test utils (phase 3), #6104
1 parent 4e2a5ac commit b3da6cd

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2280,7 +2280,7 @@ impl BurnchainController for BitcoinRegtestController {
22802280
}
22812281

22822282
#[cfg(test)]
2283-
fn bootstrap_chain(&mut self, num_blocks: u64) {
2283+
fn bootstrap_chain(&self, num_blocks: u64) {
22842284
let Some(ref local_mining_pubkey) = &self.config.burnchain.local_mining_public_key else {
22852285
warn!("No local mining pubkey while bootstrapping bitcoin regtest, will not generate bitcoin blocks");
22862286
return;

testnet/stacks-node/src/burnchains/mocknet_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ impl BurnchainController for MocknetController {
309309
}
310310

311311
#[cfg(test)]
312-
fn bootstrap_chain(&mut self, _num_blocks: u64) {}
312+
fn bootstrap_chain(&self, _num_blocks: u64) {}
313313

314314
fn connect_dbs(&mut self) -> Result<(), BurnchainControllerError> {
315315
Ok(())

testnet/stacks-node/src/burnchains/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub trait BurnchainController {
5656
fn get_stacks_epochs(&self) -> EpochList;
5757

5858
#[cfg(test)]
59-
fn bootstrap_chain(&mut self, blocks_count: u64);
59+
fn bootstrap_chain(&self, blocks_count: u64);
6060
}
6161

6262
#[derive(Debug, Clone)]

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9153,7 +9153,7 @@ fn utxo_check_on_startup_panic() {
91539153
btcd_controller
91549154
.start_bitcoind()
91559155
.expect("Failed starting bitcoind");
9156-
let mut btc_regtest_controller = BitcoinRegtestController::new(naka_conf.clone(), None);
9156+
let btc_regtest_controller = BitcoinRegtestController::new(naka_conf.clone(), None);
91579157
// Do not fully bootstrap the chain, so that the UTXOs are not yet available
91589158
btc_regtest_controller.bootstrap_chain(99);
91599159

@@ -9229,7 +9229,7 @@ fn utxo_check_on_startup_recover() {
92299229
btcd_controller
92309230
.start_bitcoind()
92319231
.expect("Failed starting bitcoind");
9232-
let mut btc_regtest_controller = BitcoinRegtestController::new(naka_conf.clone(), None);
9232+
let btc_regtest_controller = BitcoinRegtestController::new(naka_conf.clone(), None);
92339233
// Do not fully bootstrap the chain, so that the UTXOs are not yet available
92349234
btc_regtest_controller.bootstrap_chain(99);
92359235
// btc_regtest_controller.bootstrap_chain(108);
@@ -9902,11 +9902,11 @@ fn test_shadow_recovery() {
99029902
return;
99039903
}
99049904

9905-
let mut signer_test: SignerTest<SpawnedSigner> = SignerTest::new(1, vec![]);
9905+
let signer_test: SignerTest<SpawnedSigner> = SignerTest::new(1, vec![]);
99069906
signer_test.boot_to_epoch_3();
99079907

99089908
let naka_conf = signer_test.running_nodes.conf.clone();
9909-
let btc_regtest_controller = &mut signer_test.running_nodes.btc_regtest_controller;
9909+
let btc_regtest_controller = &signer_test.running_nodes.btc_regtest_controller;
99109910
let counters = signer_test.running_nodes.counters.clone();
99119911

99129912
// make another tenure
@@ -10698,7 +10698,7 @@ fn test_tenure_extend_from_flashblocks() {
1069810698
let deployer_sk = account_keys.pop().unwrap();
1069910699
let deployer_addr = tests::to_addr(&deployer_sk);
1070010700

10701-
let mut signer_test: SignerTest<SpawnedSigner> = SignerTest::new_with_config_modifications(
10701+
let signer_test: SignerTest<SpawnedSigner> = SignerTest::new_with_config_modifications(
1070210702
1,
1070310703
initial_balances,
1070410704
|_| {},
@@ -10711,7 +10711,7 @@ fn test_tenure_extend_from_flashblocks() {
1071110711
let naka_conf = signer_test.running_nodes.conf.clone();
1071210712

1071310713
let http_origin = format!("http://{}", &naka_conf.node.rpc_bind);
10714-
let btc_regtest_controller = &mut signer_test.running_nodes.btc_regtest_controller;
10714+
let btc_regtest_controller = &signer_test.running_nodes.btc_regtest_controller;
1071510715
let coord_channel = signer_test.running_nodes.coord_channel.clone();
1071610716
let counters = signer_test.running_nodes.counters.clone();
1071710717

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7337,7 +7337,7 @@ fn test_chainwork_first_intervals() {
73377337
.start_bitcoind()
73387338
.expect("Failed starting bitcoind");
73397339

7340-
let mut btc_regtest_controller = BitcoinRegtestController::new(conf.clone(), None);
7340+
let btc_regtest_controller = BitcoinRegtestController::new(conf.clone(), None);
73417341

73427342
btc_regtest_controller.bootstrap_chain(2016 * 2 - 1);
73437343

@@ -7364,7 +7364,7 @@ fn test_chainwork_partial_interval() {
73647364
.start_bitcoind()
73657365
.expect("Failed starting bitcoind");
73667366

7367-
let mut btc_regtest_controller = BitcoinRegtestController::new(conf.clone(), None);
7367+
let btc_regtest_controller = BitcoinRegtestController::new(conf.clone(), None);
73687368

73697369
btc_regtest_controller.bootstrap_chain(2016 - 1);
73707370

@@ -8345,7 +8345,7 @@ fn push_boot_receipts() {
83458345
.start_bitcoind()
83468346
.expect("Failed starting bitcoind");
83478347

8348-
let mut btc_regtest_controller = BitcoinRegtestController::new(conf.clone(), None);
8348+
let btc_regtest_controller = BitcoinRegtestController::new(conf.clone(), None);
83498349

83508350
btc_regtest_controller.bootstrap_chain(201);
83518351

@@ -9661,7 +9661,7 @@ fn listunspent_max_utxos() {
96619661
.start_bitcoind()
96629662
.expect("Failed starting bitcoind");
96639663

9664-
let mut btc_regtest_controller = BitcoinRegtestController::new(conf.clone(), None);
9664+
let btc_regtest_controller = BitcoinRegtestController::new(conf.clone(), None);
96659665

96669666
btc_regtest_controller.bootstrap_chain(201);
96679667

@@ -9707,7 +9707,7 @@ fn start_stop_bitcoind() {
97079707
.start_bitcoind()
97089708
.expect("Failed starting bitcoind");
97099709

9710-
let mut btc_regtest_controller = BitcoinRegtestController::new(conf, None);
9710+
let btc_regtest_controller = BitcoinRegtestController::new(conf, None);
97119711

97129712
btc_regtest_controller.bootstrap_chain(201);
97139713

0 commit comments

Comments
 (0)