Skip to content

Commit

Permalink
chore: change best unconnected condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Sep 8, 2023
1 parent d0d50a0 commit db232c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/net/network/src/peers/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,9 @@ impl PeersManager {
/// Returns `None` if no peer is available.
fn best_unconnected(&mut self) -> Option<(PeerId, &mut Peer)> {
let mut unconnected = self.peers.iter_mut().filter(|(_, peer)| {
peer.state.is_unconnected() &&
!peer.is_backed_off() &&
!peer.is_banned() &&
!peer.is_backed_off() &&
peer.state.is_unconnected() &&
(!self.connect_trusted_nodes_only || peer.is_trusted())
});

Expand Down

0 comments on commit db232c4

Please sign in to comment.