Add chaintype to wallet config (#1480)

* Add chain type to grin-wallet.toml

* rustfmt
This commit is contained in:
Yeastplume
2018-09-05 14:37:37 +01:00
committed by GitHub
parent 75f0ea6dd3
commit 974feaf07f
3 changed files with 12 additions and 10 deletions
+5 -1
View File
@@ -22,7 +22,7 @@ use std::time::Duration;
use clap::ArgMatches;
use config::GlobalWalletConfig;
use core::core;
use core::{core, global};
use grin_wallet::{self, controller, display, libwallet};
use grin_wallet::{HTTPWalletClient, LMDBBackend, WalletConfig, WalletInst, WalletSeed};
use keychain;
@@ -78,6 +78,10 @@ pub fn wallet_command(wallet_args: &ArgMatches, config: GlobalWalletConfig) {
// just get defaults from the global config
let mut wallet_config = config.members.unwrap().wallet;
if let Some(t) = wallet_config.chain_type.clone() {
global::set_mining_mode(t);
}
if wallet_args.is_present("external") {
wallet_config.api_listen_interface = "0.0.0.0".to_string();
}