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

Synopsis

Declared in <net.h>

[[requires_capability(0x7fb96f52f428), requires_capability(0x7fb96edb7638), requires_capability(0x7fb9675daa78), requires_capability(0x7fb96b4f20f8), requires_capability(0x7fb95f2f35f8), requires_capability(0x7fb96d9348f8), requires_capability(0x7fb95f1f1cc8), requires_capability(0x7fb95f798bd8), requires_capability(0x7fb964e14f28), requires_capability(0x7fb96108a9a8), requires_capability(0x7fb96025d3b8)]]
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

Name

Description

protect_peer [in]

NodeId of a peer we want to protect

Created with MrDocs