replace max_peers cli argument by target_peers and use excess peers above target_peers capped by a new constant PEER_EXCESS_FACTOR (relative to target_peers) (#1383)

This commit is contained in:
blacktemplar
2020-07-23 05:55:36 +02:00
committed by GitHub
parent 3a888d6ef3
commit 3c4daec9af
9 changed files with 113 additions and 21 deletions

View File

@@ -37,7 +37,7 @@ pub struct Config {
pub enr_tcp_port: Option<u16>,
/// Target number of connected peers.
pub max_peers: usize,
pub target_peers: usize,
/// Gossipsub configuration parameters.
#[serde(skip)]
@@ -122,7 +122,7 @@ impl Default for Config {
enr_address: None,
enr_udp_port: None,
enr_tcp_port: None,
max_peers: 50,
target_peers: 50,
gs_config,
discv5_config,
boot_nodes: vec![],