From 03b484dbdf4e1bf149f88e44f5ba3626cbc41296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan-=C8=98tefan=20Neac=C5=9Fu?= Date: Tue, 21 Jun 2022 15:16:17 +0300 Subject: [PATCH] Fix eth feature enabled build (#1379) --- gateway/src/commands/init.rs | 6 ++++++ gateway/src/commands/run.rs | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gateway/src/commands/init.rs b/gateway/src/commands/init.rs index 76966ca9f3..0785ebaeeb 100644 --- a/gateway/src/commands/init.rs +++ b/gateway/src/commands/init.rs @@ -177,6 +177,12 @@ mod tests { mnemonic: Some("a b c".to_string()), statistics_service_url: None, enabled_statistics: None, + #[cfg(all(feature = "eth", not(feature = "coconut")))] + enabled_credentials_mode: None, + #[cfg(all(feature = "eth", not(feature = "coconut")))] + eth_endpoint: "".to_string(), + #[cfg(all(feature = "eth", not(feature = "coconut")))] + validators: None, }; let config = Config::new(&args.id); diff --git a/gateway/src/commands/run.rs b/gateway/src/commands/run.rs index 96cfc0c5b9..5777f3c2b8 100644 --- a/gateway/src/commands/run.rs +++ b/gateway/src/commands/run.rs @@ -47,10 +47,10 @@ pub struct Run { #[clap(long)] mnemonic: Option, - /// Set this gateway to work in a disabled credentials mode that would allow clients to bypass bandwidth credential requirement + /// Set this gateway to work in a enabled credentials mode that would disallow clients to bypass bandwidth credential requirement #[cfg(all(feature = "eth", not(feature = "coconut")))] #[clap(long)] - disabled_credentials_mode: bool, + enabled_credentials_mode: Option, /// URL of an Ethereum full node that we want to use for getting bandwidth tokens from ERC20 tokens #[cfg(all(feature = "eth", not(feature = "coconut")))] @@ -84,7 +84,7 @@ impl From for OverrideConfig { mnemonic: run_config.mnemonic, #[cfg(all(feature = "eth", not(feature = "coconut")))] - disabled_credentials_mode: run_config.disabled_credentials_mode, + enabled_credentials_mode: run_config.enabled_credentials_mode, #[cfg(all(feature = "eth", not(feature = "coconut")))] eth_endpoint: run_config.eth_endpoint,