mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-13 08:45:53 -04:00
Fix monero-wallet-rpc
startup for mainnet CLI
There is no `--mainnet` flag. Since we cannot just pass an empty string to `.arg()` we use the `.args()` method to pass nothing for mainnet and the respective flags for stagenet and testnet.
This commit is contained in:
parent
1aaffb09f9
commit
4dd696ebe1
1 changed files with 13 additions and 5 deletions
|
@ -126,15 +126,23 @@ impl WalletRpc {
|
||||||
"Starting monero-wallet-rpc on"
|
"Starting monero-wallet-rpc on"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let network_flag = match network {
|
||||||
|
Network::Mainnet => {
|
||||||
|
vec![]
|
||||||
|
}
|
||||||
|
Network::Stagenet => {
|
||||||
|
vec!["--stagenet"]
|
||||||
|
}
|
||||||
|
Network::Testnet => {
|
||||||
|
vec!["--testnet"]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
let mut child = Command::new(self.exec_path())
|
let mut child = Command::new(self.exec_path())
|
||||||
.env("LANG", "en_AU.UTF-8")
|
.env("LANG", "en_AU.UTF-8")
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
.kill_on_drop(true)
|
.kill_on_drop(true)
|
||||||
.arg(match network {
|
.args(network_flag)
|
||||||
Network::Mainnet => "--mainnet",
|
|
||||||
Network::Stagenet => "--stagenet",
|
|
||||||
Network::Testnet => "--testnet",
|
|
||||||
})
|
|
||||||
.arg("--daemon-address")
|
.arg("--daemon-address")
|
||||||
.arg(daemon_address)
|
.arg(daemon_address)
|
||||||
.arg("--rpc-bind-port")
|
.arg("--rpc-bind-port")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue