Skip to content

Commit 884f300

Browse files
authored
use DEFAULT_TARGET_PEERS for target peers everywhere (#7916)
Was going to leave this as a comment on #7877 but when noticed it had already been merged. we have `DEFAULT_TARGET_PEERS` which was set to 50 and only used on the `Default` impl for `peer_manager`'s `Config`, which then get's overridden by this `lighthouse_network::Config`s default This PR unifies everything on `DEFAULT_TARGET_PEERS`
1 parent d24a6d2 commit 884f300

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

beacon_node/lighthouse_network/src/config.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use crate::listen_addr::{ListenAddr, ListenAddress};
2+
use crate::peer_manager::config::DEFAULT_TARGET_PEERS;
23
use crate::rpc::config::{InboundRateLimiterConfig, OutboundRateLimiterConfig};
34
use crate::types::GossipKind;
45
use crate::{Enr, PeerIdSerialized};
@@ -341,7 +342,7 @@ impl Default for Config {
341342
enr_udp6_port: None,
342343
enr_quic6_port: None,
343344
enr_tcp6_port: None,
344-
target_peers: 200,
345+
target_peers: DEFAULT_TARGET_PEERS,
345346
discv5_config,
346347
boot_nodes_enr: vec![],
347348
boot_nodes_multiaddr: vec![],

beacon_node/lighthouse_network/src/peer_manager/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub const DEFAULT_PING_INTERVAL_OUTBOUND: u64 = 15;
88
pub const DEFAULT_PING_INTERVAL_INBOUND: u64 = 20;
99

1010
/// Default number of peers to connect to.
11-
pub const DEFAULT_TARGET_PEERS: usize = 50;
11+
pub const DEFAULT_TARGET_PEERS: usize = 200;
1212

1313
/// Configurations for the PeerManager.
1414
#[derive(Debug)]

0 commit comments

Comments
 (0)