From e895c467b2eff4c6aa881e5e7e4272290fbbf363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan-=C8=98tefan=20Neac=C8=99u?= Date: Tue, 22 Feb 2022 20:09:08 +0300 Subject: [PATCH] Make sure run uses the args passed at init, in eth mode --- gateway/src/commands/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gateway/src/commands/mod.rs b/gateway/src/commands/mod.rs index b80a6092db..a10f81b494 100644 --- a/gateway/src/commands/mod.rs +++ b/gateway/src/commands/mod.rs @@ -15,12 +15,12 @@ pub(crate) mod run; pub(crate) mod sign; pub(crate) mod upgrade; -#[cfg(not(feature = "coconut"))] +#[cfg(all(not(feature = "eth"), not(feature = "coconut")))] const DEFAULT_ETH_ENDPOINT: &str = "https://rinkeby.infura.io/v3/00000000000000000000000000000000"; -#[cfg(not(feature = "coconut"))] +#[cfg(all(not(feature = "eth"), not(feature = "coconut")))] const DEFAULT_VALIDATOR_ENDPOINT: &str = "http://localhost:26657"; // A dummy mnemonic -#[cfg(not(feature = "coconut"))] +#[cfg(all(not(feature = "eth"), not(feature = "coconut")))] const DEFAULT_MNEMONIC: &str = "typical regret aware used tennis noise resource crisp defy join donate orient army item immense clean emerge globe gift chronic loan flat enter egg"; #[derive(Subcommand)] @@ -122,8 +122,7 @@ pub(crate) fn override_config(mut config: Config, args: OverrideConfig) -> Confi config = config.with_custom_persistent_store(datastore_path); } - // These default values are available even when building with `feature = "eth"`. - #[cfg(not(feature = "coconut"))] + #[cfg(all(not(feature = "eth"), not(feature = "coconut")))] { config = config.with_custom_validator_nymd(parse_validators(DEFAULT_VALIDATOR_ENDPOINT)); config = config.with_cosmos_mnemonic(String::from(DEFAULT_MNEMONIC));