Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions beacon_node/lighthouse_network/src/peer_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,11 @@ impl<E: EthSpec> PeerManager<E> {
self.max_peers().saturating_sub(dialing_peers) - peer_count
} else if outbound_only_peer_count < self.min_outbound_only_peers()
&& peer_count < self.max_outbound_dialing_peers()
&& self.target_peers > 10
// This condition is to attempt to exclude testnets without
// an explicit CLI flag. For networks with low peer counts, we don't want to do
// repetitive searches for outbound peers, when we may be already connected to every
// peer on the testnet
{
self.max_outbound_dialing_peers()
.saturating_sub(dialing_peers)
Expand Down