gossip: choose a random subset on send instead of limiting connections (#2776)

* gossip: choose random subset on send

* naming bikeshed
This commit is contained in:
Andronik Ordian
2021-03-30 20:59:53 +02:00
committed by GitHub
parent a3115401c3
commit 9ac35d9f2b
10 changed files with 41 additions and 27 deletions
@@ -57,7 +57,8 @@ impl PeerSet {
notifications_protocol: protocol,
max_notification_size,
set_config: sc_network::config::SetConfig {
in_peers: 25,
// we want our gossip subset to always include reserved peers
in_peers: super::MIN_GOSSIP_PEERS as u32 / 2,
out_peers: 0,
reserved_nodes: Vec::new(),
non_reserved_mode: sc_network::config::NonReservedPeerMode::Accept,