CConnman::EvictTxPeerIfFull

If we are at capacity for inbound tx-relay peers, attempt to evict one.

Synopsis

Declared in <net.h>

bool
EvictTxPeerIfFull(std::optional<NodeId> protect_peer = std::nullopt);

Return Value

bool Returns true if successful (either there is no need for eviction, or a peer was evicted). Returns false, if we are full but couldn't find a peer to evict (all eligible peers are protected) so that the caller can deal with this.

Parameters

NameDescription
protect_peer [in]NodeId of a peer we want to protect