From e4e214913ebfa9ebb53db609a42f0021b67df31e Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri, 28 Jul 2023 19:48:15 +0000 Subject: [PATCH] set target-peers in simulator --- testing/simulator/src/no_eth1_sim.rs | 1 + testing/simulator/src/sync_sim.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/testing/simulator/src/no_eth1_sim.rs b/testing/simulator/src/no_eth1_sim.rs index fc18b1cd489..c296888b858 100644 --- a/testing/simulator/src/no_eth1_sim.rs +++ b/testing/simulator/src/no_eth1_sim.rs @@ -93,6 +93,7 @@ pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { beacon_config.sync_eth1_chain = true; beacon_config.network.enr_address = (Some(Ipv4Addr::LOCALHOST), None); + beacon_config.network.target_peers = node_count - 1; let main_future = async { let network = LocalNetwork::new(context.clone(), beacon_config.clone()).await?; diff --git a/testing/simulator/src/sync_sim.rs b/testing/simulator/src/sync_sim.rs index 78f7e1ee9fb..8f037a71dc5 100644 --- a/testing/simulator/src/sync_sim.rs +++ b/testing/simulator/src/sync_sim.rs @@ -97,6 +97,7 @@ fn syncing_sim( beacon_config.http_api.allow_sync_stalled = true; beacon_config.network.enr_address = (Some(Ipv4Addr::LOCALHOST), None); + beacon_config.network.target_peers = 1; // Generate the directories and keystores required for the validator clients. let validator_indices = (0..num_validators).collect::>();