docs(net): update best_unconnected docs (#670)

This commit is contained in:
Matthias Seitz
2023-01-01 16:16:30 +01:00
committed by GitHub
parent 20847845e2
commit ed55c2bf2b

View File

@ -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)> {