CConnman::EvictTxPeerIfFull

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

Synopsis

Declared in <net.h>

[[requires_capability(0x7ff36f781868), requires_capability(0x7ff36f4680d8), requires_capability(0x7ff37f407698), requires_capability(0x7ff377564468), requires_capability(0x7ff37b69f968), requires_capability(0x7ff37e1c7598), requires_capability(0x7ff379a7dae8), requires_capability(0x7ff36f4a4b28), requires_capability(0x7ff37bc15788), requires_capability(0x7ff3814a5758), requires_capability(0x7ff3666cc7d8)]]
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