mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-06-17 10:51:22 +08:00
Moved default wallet creation to so it is constrained to test code
This commit is contained in:
@@ -1546,6 +1546,11 @@ impl BurnchainController for BitcoinRegtestController {
|
||||
panic!();
|
||||
}
|
||||
}
|
||||
info!("Creating wallet if it does not exist");
|
||||
match self.create_wallet_if_dne() {
|
||||
Err(e) => warn!("Error when creating wallet: {:?}", e),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,18 +90,6 @@ impl RunLoop {
|
||||
#[cfg(not(test))]
|
||||
fn bump_blocks_processed(&self) {}
|
||||
|
||||
#[cfg(test)]
|
||||
fn create_wallet_if_dne(&self, burnchain: &BitcoinRegtestController) {
|
||||
info!("Miner node: creating the wallet if it does not exist");
|
||||
match burnchain.create_wallet_if_dne() {
|
||||
Err(e) => warn!("Error when creating wallet: {:?}", e),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
fn create_wallet_if_dne(&self, burnchain: &BitcoinRegtestController) {}
|
||||
|
||||
/// Starts the testnet runloop.
|
||||
///
|
||||
/// This function will block by looping infinitely.
|
||||
@@ -135,9 +123,6 @@ impl RunLoop {
|
||||
let pox_constants = burnchain.get_pox_constants();
|
||||
|
||||
let is_miner = if self.config.node.miner {
|
||||
// Initialize the wallet.
|
||||
self.create_wallet_if_dne(&burnchain);
|
||||
|
||||
let keychain = Keychain::default(self.config.node.seed.clone());
|
||||
let node_address = Keychain::address_from_burnchain_signer(
|
||||
&keychain.get_burnchain_signer(),
|
||||
|
||||
Reference in New Issue
Block a user