Function sn_networking::sort_peers_by_address
source · pub fn sort_peers_by_address(
peers: Vec<PeerId>,
address: &NetworkAddress,
expected_entries: usize
) -> Result<Vec<PeerId>, Error>
Expand description
Sort the provided peers by their distance to the given NetworkAddress
.
Return with the closest expected number of entries if has.