From e454077f1d6b2696bc06678bbb00a5b9e0e510cc Mon Sep 17 00:00:00 2001 From: Hector Santos Date: Sun, 22 Sep 2024 12:14:10 +0200 Subject: [PATCH] Avoid check gateways file in local simulation --- crates/core/src/config.rs | 3 ++- crates/core/src/node/testing_impl.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/core/src/config.rs b/crates/core/src/config.rs index c4b15d1a0..cd9f1f2cf 100644 --- a/crates/core/src/config.rs +++ b/crates/core/src/config.rs @@ -235,7 +235,8 @@ impl ConfigArgs { .gateways } Err(err) => { - #[cfg(not(any(test, debug_assertions)))] + // FIXME: Remove local-simulation feature and use runtime flags + #[cfg(all(not(any(test, debug_assertions)), not(feature = "local-simulation")))] { if peer_id.is_none() && mode == OperationMode::Network { tracing::error!(file = ?gateways_file, "Failed to read gateways file: {err}"); diff --git a/crates/core/src/node/testing_impl.rs b/crates/core/src/node/testing_impl.rs index 90fdffbb8..69a1187ae 100644 --- a/crates/core/src/node/testing_impl.rs +++ b/crates/core/src/node/testing_impl.rs @@ -367,6 +367,7 @@ impl SimNetwork { let mut config_args = ConfigArgs::default(); config_args.id = Some(format!("{label}")); + // FIXME: Is necessary use config_args.build() for the simulation. Related with the FXIME in Config line 238 let mut config = NodeConfig::new(config_args.build().unwrap()).await.unwrap(); config.key_pair = keypair; config.network_listener_ip = Ipv6Addr::LOCALHOST.into();