Function zebra_network::peer_set::initialize::limit_initial_peers

source ยท
async fn limit_initial_peers(
    config: &Config,
    address_book_updater: Sender<MetaAddrChange>,
) -> HashSet<PeerSocketAddr>
Expand description

Limit the number of initial_peers addresses entries to the configured peerset_initial_target_size.

Returns randomly chosen entries from the provided set of addresses, in a random order.

Also sends every initial peer to the address_book_updater.