From d7985ef05d796b8de40802b77fdfed913fc8e2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 2 Nov 2020 14:14:08 +0000 Subject: [PATCH] Renamed directory arguments to validator (#408) --- clients/native/src/commands/init.rs | 10 +++++----- clients/native/src/commands/mod.rs | 4 ++-- clients/native/src/commands/run.rs | 6 +++--- clients/socks5/src/commands/init.rs | 10 +++++----- clients/socks5/src/commands/mod.rs | 4 ++-- clients/socks5/src/commands/run.rs | 6 +++--- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/clients/native/src/commands/init.rs b/clients/native/src/commands/init.rs index 072bd288c9..4a0bc71326 100644 --- a/clients/native/src/commands/init.rs +++ b/clients/native/src/commands/init.rs @@ -47,9 +47,9 @@ pub fn command_args<'a, 'b>() -> clap::App<'a, 'b> { .help("Id of the gateway we are going to connect to.") .takes_value(true) ) - .arg(Arg::with_name("directory") - .long("directory") - .help("Address of the directory server the client is getting topology from") + .arg(Arg::with_name("validator") + .long("validator") + .help("Address of the validator server the client is getting topology from") .takes_value(true), ) .arg(Arg::with_name("disable-socket") @@ -101,8 +101,8 @@ async fn register_with_gateway( .expect("failed to register with the gateway!") } -async fn gateway_details(directory_server: &str, gateway_id: &str) -> gateway::Node { - let validator_client_config = validator_client::Config::new(directory_server.to_string()); +async fn gateway_details(validator_server: &str, gateway_id: &str) -> gateway::Node { + let validator_client_config = validator_client::Config::new(validator_server.to_string()); let validator_client = validator_client::Client::new(validator_client_config); let topology = validator_client.get_active_topology().await.unwrap(); let nym_topology: NymTopology = topology.into(); diff --git a/clients/native/src/commands/mod.rs b/clients/native/src/commands/mod.rs index 06465ff9bb..848780729b 100644 --- a/clients/native/src/commands/mod.rs +++ b/clients/native/src/commands/mod.rs @@ -20,8 +20,8 @@ pub(crate) mod run; pub(crate) mod upgrade; pub(crate) fn override_config(mut config: Config, matches: &ArgMatches) -> Config { - if let Some(directory) = matches.value_of("directory") { - config.get_base_mut().with_custom_validator(directory); + if let Some(validator) = matches.value_of("validator") { + config.get_base_mut().with_custom_validator(validator); } if let Some(gateway_id) = matches.value_of("gateway") { diff --git a/clients/native/src/commands/run.rs b/clients/native/src/commands/run.rs index 2399b03c18..0d08129e8c 100644 --- a/clients/native/src/commands/run.rs +++ b/clients/native/src/commands/run.rs @@ -30,9 +30,9 @@ pub fn command_args<'a, 'b>() -> clap::App<'a, 'b> { .required(true) ) // the rest of arguments are optional, they are used to override settings in config file - .arg(Arg::with_name("directory") - .long("directory") - .help("Address of the directory server the client is getting topology from") + .arg(Arg::with_name("validator") + .long("validator") + .help("Address of the validator server the client is getting topology from") .takes_value(true), ) .arg(Arg::with_name("gateway") diff --git a/clients/socks5/src/commands/init.rs b/clients/socks5/src/commands/init.rs index e3cead3b5e..9e5cccf08e 100644 --- a/clients/socks5/src/commands/init.rs +++ b/clients/socks5/src/commands/init.rs @@ -52,9 +52,9 @@ pub fn command_args<'a, 'b>() -> clap::App<'a, 'b> { .help("Id of the gateway we are going to connect to.") .takes_value(true) ) - .arg(Arg::with_name("directory") - .long("directory") - .help("Address of the directory server the client is getting topology from") + .arg(Arg::with_name("validator") + .long("validator") + .help("Address of the validator server the client is getting topology from") .takes_value(true), ) .arg(Arg::with_name("port") @@ -102,8 +102,8 @@ async fn register_with_gateway( .expect("failed to register with the gateway!") } -async fn gateway_details(directory_server: &str, gateway_id: &str) -> gateway::Node { - let validator_client_config = validator_client::Config::new(directory_server.to_string()); +async fn gateway_details(validator_server: &str, gateway_id: &str) -> gateway::Node { + let validator_client_config = validator_client::Config::new(validator_server.to_string()); let validator_client = validator_client::Client::new(validator_client_config); let topology = validator_client.get_active_topology().await.unwrap(); let nym_topology: NymTopology = topology.into(); diff --git a/clients/socks5/src/commands/mod.rs b/clients/socks5/src/commands/mod.rs index abf8c6a232..30be2d00ba 100644 --- a/clients/socks5/src/commands/mod.rs +++ b/clients/socks5/src/commands/mod.rs @@ -20,8 +20,8 @@ pub(crate) mod run; pub(crate) mod upgrade; pub(crate) fn override_config(mut config: Config, matches: &ArgMatches) -> Config { - if let Some(directory) = matches.value_of("directory") { - config.get_base_mut().with_custom_validator(directory); + if let Some(validator) = matches.value_of("validator") { + config.get_base_mut().with_custom_validator(validator); } if let Some(gateway_id) = matches.value_of("gateway") { diff --git a/clients/socks5/src/commands/run.rs b/clients/socks5/src/commands/run.rs index 36d1b5acd3..e1f8e840c9 100644 --- a/clients/socks5/src/commands/run.rs +++ b/clients/socks5/src/commands/run.rs @@ -40,9 +40,9 @@ pub fn command_args<'a, 'b>() -> clap::App<'a, 'b> { .help("Address of the socks5 provider to send messages to.") .takes_value(true) ) - .arg(Arg::with_name("directory") - .long("directory") - .help("Address of the directory server the client is getting topology from") + .arg(Arg::with_name("validator") + .long("validator") + .help("Address of the validator server the client is getting topology from") .takes_value(true), ) .arg(Arg::with_name("gateway")