Remove unused timeout wallet arg and config field
This commit is contained in:
parent
81e17bad40
commit
0d7b1a84cb
|
@ -15,11 +15,6 @@ pub fn parse_args(matches: &ArgMatches<'_>) -> Result<WalletConfig, Box<dyn erro
|
||||||
} else {
|
} else {
|
||||||
socketaddr!("127.0.0.1:8001")
|
socketaddr!("127.0.0.1:8001")
|
||||||
};
|
};
|
||||||
let timeout = if let Some(secs) = matches.value_of("timeout") {
|
|
||||||
Some(secs.to_string().parse().expect("integer"))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
};
|
|
||||||
|
|
||||||
let proxy = matches.value_of("proxy").map(|proxy| proxy.to_string());
|
let proxy = matches.value_of("proxy").map(|proxy| proxy.to_string());
|
||||||
|
|
||||||
|
@ -48,7 +43,6 @@ pub fn parse_args(matches: &ArgMatches<'_>) -> Result<WalletConfig, Box<dyn erro
|
||||||
id,
|
id,
|
||||||
command,
|
command,
|
||||||
network,
|
network,
|
||||||
timeout,
|
|
||||||
proxy,
|
proxy,
|
||||||
drone_port: None,
|
drone_port: None,
|
||||||
rpc_client: None,
|
rpc_client: None,
|
||||||
|
@ -74,12 +68,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||||
.value_name("PATH")
|
.value_name("PATH")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.help("/path/to/id.json"),
|
.help("/path/to/id.json"),
|
||||||
).arg(
|
|
||||||
Arg::with_name("timeout")
|
|
||||||
.long("timeout")
|
|
||||||
.value_name("SECS")
|
|
||||||
.takes_value(true)
|
|
||||||
.help("Max seconds to wait to get necessary gossip from the network"),
|
|
||||||
).arg(
|
).arg(
|
||||||
Arg::with_name("proxy")
|
Arg::with_name("proxy")
|
||||||
.long("proxy")
|
.long("proxy")
|
||||||
|
|
|
@ -86,7 +86,6 @@ pub struct WalletConfig {
|
||||||
pub id: Keypair,
|
pub id: Keypair,
|
||||||
pub command: WalletCommand,
|
pub command: WalletCommand,
|
||||||
pub network: SocketAddr,
|
pub network: SocketAddr,
|
||||||
pub timeout: Option<u64>,
|
|
||||||
pub proxy: Option<String>,
|
pub proxy: Option<String>,
|
||||||
pub drone_port: Option<u16>,
|
pub drone_port: Option<u16>,
|
||||||
pub rpc_client: Option<RpcClient>,
|
pub rpc_client: Option<RpcClient>,
|
||||||
|
@ -100,7 +99,6 @@ impl Default for WalletConfig {
|
||||||
id: Keypair::new(),
|
id: Keypair::new(),
|
||||||
command: WalletCommand::Balance,
|
command: WalletCommand::Balance,
|
||||||
network: default_addr,
|
network: default_addr,
|
||||||
timeout: None,
|
|
||||||
proxy: None,
|
proxy: None,
|
||||||
drone_port: None,
|
drone_port: None,
|
||||||
rpc_client: None,
|
rpc_client: None,
|
||||||
|
|
Loading…
Reference in New Issue