diff --git a/crates/net/network/src/peers/manager.rs b/crates/net/network/src/peers/manager.rs index bb67da39ea..a6c0bf5b65 100644 --- a/crates/net/network/src/peers/manager.rs +++ b/crates/net/network/src/peers/manager.rs @@ -455,7 +455,11 @@ impl PeersManager { /// Returns the idle peer with the highest reputation. /// - /// Peers with a `forkId` are considered better than peers without. + /// Peers that are `trusted`, see [PeerKind], are prioritized as long as they're not currently + /// marked as banned. Peers with a `forkId` are considered better than peers without. + /// + /// If `connect_trusted_nodes_only` is enabled, see [PeersConfig], then this will only consider + /// `trusted` peers. /// /// Returns `None` if no peer is available. fn best_unconnected(&mut self) -> Option<(PeerId, &mut Peer)> {