diff --git a/tests/beacon_chain_sim/src/local_network.rs b/tests/beacon_chain_sim/src/local_network.rs index 05fbc7fa2..fe9b0d5b8 100644 --- a/tests/beacon_chain_sim/src/local_network.rs +++ b/tests/beacon_chain_sim/src/local_network.rs @@ -8,6 +8,8 @@ use std::ops::Deref; use std::sync::Arc; use types::EthSpec; +const BOOTNODE_PORT: u16 = 42424; + /// Helper struct to reduce `Arc` usage. pub struct Inner { context: RuntimeContext, @@ -42,8 +44,11 @@ impl LocalNetwork { /// Creates a new network with a single `BeaconNode`. pub fn new( context: RuntimeContext, - beacon_config: ClientConfig, + mut beacon_config: ClientConfig, ) -> impl Future { + // Fix bootnode ports + beacon_config.network.discovery_port = BOOTNODE_PORT; + beacon_config.network.libp2p_port = BOOTNODE_PORT; LocalBeaconNode::production(context.service_context("boot_node".into()), beacon_config).map( |beacon_node| Self { inner: Arc::new(Inner {