pub fn sort_peers_by_address<'a>(
    peers: &'a Vec<PeerId>,
    address: &NetworkAddress,
    expected_entries: usize
) -> Result<Vec<&'a PeerId>, NetworkError>
Expand description

Sort the provided peers by their distance to the given NetworkAddress. Return with the closest expected number of entries if has.