From 6faae00dc187fca9080306fe4640b069ed7b0e29 Mon Sep 17 00:00:00 2001 From: Ludo Galabru Date: Thu, 7 Dec 2023 16:49:00 -0500 Subject: [PATCH] chore: expose miner_wallet_name in settings --- components/clarinet-files/src/network_manifest.rs | 5 +++++ components/stacks-network/src/orchestrator.rs | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/clarinet-files/src/network_manifest.rs b/components/clarinet-files/src/network_manifest.rs index 1a2c6b782..580a15242 100644 --- a/components/clarinet-files/src/network_manifest.rs +++ b/components/clarinet-files/src/network_manifest.rs @@ -88,6 +88,7 @@ pub struct DevnetConfigFile { pub miner_mnemonic: Option, pub miner_derivation_path: Option, pub miner_coinbase_recipient: Option, + pub miner_wallet_name: Option, pub faucet_mnemonic: Option, pub faucet_derivation_path: Option, pub bitcoin_controller_block_time: Option, @@ -246,6 +247,7 @@ pub struct DevnetConfig { pub miner_mnemonic: String, pub miner_derivation_path: String, pub miner_coinbase_recipient: String, + pub miner_wallet_name: String, pub faucet_stx_address: String, pub faucet_secret_key_hex: String, pub faucet_btc_address: String, @@ -805,6 +807,9 @@ impl NetworkManifest { miner_coinbase_recipient: devnet_config .miner_coinbase_recipient .unwrap_or(miner_stx_address), + miner_wallet_name: devnet_config + .miner_wallet_name + .unwrap_or("".to_string()), faucet_btc_address, faucet_stx_address, faucet_mnemonic, diff --git a/components/stacks-network/src/orchestrator.rs b/components/stacks-network/src/orchestrator.rs index 2af072224..55337d484 100644 --- a/components/stacks-network/src/orchestrator.rs +++ b/components/stacks-network/src/orchestrator.rs @@ -1042,7 +1042,7 @@ poll_time_secs = 1 timeout = 30 peer_host = "host.docker.internal" rpc_ssl = false -wallet_name = "devnet" +wallet_name = "{miner_wallet_name}" username = "{bitcoin_node_username}" password = "{bitcoin_node_password}" rpc_port = {orchestrator_ingestion_port} @@ -1052,6 +1052,7 @@ peer_port = {bitcoin_node_p2p_port} bitcoin_node_password = devnet_config.bitcoin_node_password, bitcoin_node_p2p_port = devnet_config.bitcoin_node_p2p_port, orchestrator_ingestion_port = devnet_config.orchestrator_ingestion_port, + miner_wallet_name = devnet_config.miner_wallet_name, )); stacks_conf.push_str(&format!( @@ -2551,7 +2552,7 @@ events_keys = ["*"] "jsonrpc": "1.0", "id": "stacks-network", "method": "createwallet", - "params": json!({ "wallet_name": "", "disable_private_keys": true }) + "params": json!({ "wallet_name": devnet_config.miner_wallet_name, "disable_private_keys": true }) })) .send() .await