mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Change wallet api_listen_port format (#815)
* Change wallet api_listen_port format * Fix tests
This commit is contained in:
parent
9d366fe492
commit
675faec05d
3 changed files with 5 additions and 5 deletions
|
@ -162,7 +162,7 @@ impl LocalServerContainer {
|
|||
let working_dir = format!("target/tmp/test_servers/{}", config.name);
|
||||
let mut wallet_config = WalletConfig::default();
|
||||
|
||||
wallet_config.api_listen_port = format!("{}", config.wallet_port);
|
||||
wallet_config.api_listen_port = config.wallet_port;
|
||||
wallet_config.check_node_api_http_addr = config.wallet_validating_node_url.clone();
|
||||
wallet_config.data_file_dir = working_dir.clone();
|
||||
Ok(LocalServerContainer {
|
||||
|
@ -263,7 +263,7 @@ impl LocalServerContainer {
|
|||
|
||||
self.wallet_config = WalletConfig::default();
|
||||
|
||||
self.wallet_config.api_listen_port = format!("{}", self.config.wallet_port);
|
||||
self.wallet_config.api_listen_port = self.config.wallet_port;
|
||||
self.wallet_config.check_node_api_http_addr =
|
||||
self.config.wallet_validating_node_url.clone();
|
||||
self.wallet_config.data_file_dir = self.working_dir.clone();
|
||||
|
|
|
@ -516,7 +516,7 @@ fn wallet_command(wallet_args: &ArgMatches, global_config: GlobalConfig) {
|
|||
match wallet_args.subcommand() {
|
||||
("listen", Some(listen_args)) => {
|
||||
if let Some(port) = listen_args.value_of("port") {
|
||||
wallet_config.api_listen_port = port.to_string();
|
||||
wallet_config.api_listen_port = port.parse().unwrap();
|
||||
}
|
||||
wallet::server::start_rest_apis(wallet_config, keychain);
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ pub struct WalletConfig {
|
|||
// by default this is 127.0.0.1 (and will not accept connections from external clients)
|
||||
pub api_listen_interface: String,
|
||||
// The port this wallet will run on
|
||||
pub api_listen_port: String,
|
||||
pub api_listen_port: u16,
|
||||
// The api address of a running server node against which transaction inputs
|
||||
// will be checked during send
|
||||
pub check_node_api_http_addr: String,
|
||||
|
@ -191,7 +191,7 @@ impl Default for WalletConfig {
|
|||
WalletConfig {
|
||||
// enable_wallet: false,
|
||||
api_listen_interface: "127.0.0.1".to_string(),
|
||||
api_listen_port: "13415".to_string(),
|
||||
api_listen_port: 13415,
|
||||
check_node_api_http_addr: "http://127.0.0.1:13413".to_string(),
|
||||
data_file_dir: ".".to_string(),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue