Skip to content

Commit

Permalink
chore: expose miner_wallet_name in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludo Galabru authored and hugocaillard committed Dec 8, 2023
1 parent eba6abd commit c782152
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions components/clarinet-files/src/network_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ pub struct DevnetConfigFile {
pub miner_mnemonic: Option<String>,
pub miner_derivation_path: Option<String>,
pub miner_coinbase_recipient: Option<String>,
pub miner_wallet_name: Option<String>,
pub faucet_mnemonic: Option<String>,
pub faucet_derivation_path: Option<String>,
pub bitcoin_controller_block_time: Option<u32>,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions components/stacks-network/src/orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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!(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c782152

Please sign in to comment.