zebra_network::peer::priority

Function address_is_valid_for_outbound_connections

source
pub fn address_is_valid_for_outbound_connections(
    peer_addr: PeerSocketAddr,
    network: impl Into<Option<Network>>,
) -> Result<(), &'static str>
Expand description

Is the PeerSocketAddr we have for this peer valid for outbound connections?

Since the addresses in the address book are unique, this check can be used to permanently reject entire MetaAddrs.