Skip to content

Commit de91c77

Browse files
authored
Improve peer performance for NAT'd nodes (#5345)
* Merge latest unstable * Reduce diff * Reduce logic, discover up to max peers * Peer discovery for Natd peers
1 parent 84a902a commit de91c77

File tree

1 file changed

+1
-2
lines changed
  • beacon_node/lighthouse_network/src/peer_manager

1 file changed

+1
-2
lines changed

beacon_node/lighthouse_network/src/peer_manager/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
880880
let outbound_only_peer_count = self.network_globals.connected_outbound_only_peers();
881881
let wanted_peers = if peer_count < self.target_peers.saturating_sub(dialing_peers) {
882882
// We need more peers in general.
883-
// Note: The maximum discovery query is bounded by `Discovery`.
884-
self.target_peers.saturating_sub(dialing_peers) - peer_count
883+
self.max_peers().saturating_sub(dialing_peers) - peer_count
885884
} else if outbound_only_peer_count < self.min_outbound_only_peers()
886885
&& peer_count < self.max_outbound_dialing_peers()
887886
{

0 commit comments

Comments
 (0)