Skip to content

Commit

Permalink
Dialing the same peer-id error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AgeManning committed Jan 23, 2024
1 parent a403138 commit ad1ce78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions beacon_node/lighthouse_network/src/peer_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,10 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
// considered a priority. We have pre-allocated some extra priority slots for these
// peers as specified by PRIORITY_PEER_EXCESS. Therefore we dial these peers, even
// if we are already at our max_peer limit.
if min_ttl.is_some() && connected_or_dialing + to_dial_peers < self.max_priority_peers()
|| connected_or_dialing + to_dial_peers < self.max_peers()
if !self.peers_to_dial.contains(&enr)
&& ((min_ttl.is_some()
&& connected_or_dialing + to_dial_peers < self.max_priority_peers())
|| connected_or_dialing + to_dial_peers < self.max_peers())
{
// This should be updated with the peer dialing. In fact created once the peer is
// dialed
Expand Down

0 comments on commit ad1ce78

Please sign in to comment.