Skip to content

Commit 695f415

Browse files
committed
1 parent 8072835 commit 695f415

File tree

1 file changed

+5
-12
lines changed
  • beacon_node/lighthouse_network/src/peer_manager

1 file changed

+5
-12
lines changed

beacon_node/lighthouse_network/src/peer_manager/mod.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -841,21 +841,14 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
841841
let outbound_only_peer_count = self.network_globals.connected_outbound_only_peers();
842842
let wanted_peers = if peer_count < self.target_peers.saturating_sub(dialing_peers) {
843843
// We need more peers in general.
844-
// The maximum discovery query is for 16 peers, but we can search for less if
845-
// needed.
846-
std::cmp::min(
847-
self.target_peers.saturating_sub(dialing_peers) - peer_count,
848-
16,
849-
)
844+
// Note: The maximum discovery query is bounded by `Discovery`.
845+
self.target_peers.saturating_sub(dialing_peers) - peer_count
850846
} else if outbound_only_peer_count < self.min_outbound_only_peers()
851847
&& peer_count < self.max_outbound_dialing_peers()
852848
{
853-
std::cmp::min(
854-
self.max_outbound_dialing_peers()
855-
.saturating_sub(dialing_peers)
856-
- peer_count,
857-
16,
858-
)
849+
self.max_outbound_dialing_peers()
850+
.saturating_sub(dialing_peers)
851+
- peer_count
859852
} else {
860853
0
861854
};

0 commit comments

Comments
 (0)