mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-22 11:41:28 +00:00
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
This commit is contained in:
parent
84a902a589
commit
de91c77cb2
@ -880,8 +880,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
|
||||
let outbound_only_peer_count = self.network_globals.connected_outbound_only_peers();
|
||||
let wanted_peers = if peer_count < self.target_peers.saturating_sub(dialing_peers) {
|
||||
// We need more peers in general.
|
||||
// Note: The maximum discovery query is bounded by `Discovery`.
|
||||
self.target_peers.saturating_sub(dialing_peers) - peer_count
|
||||
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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user