[#CConnman-EvictTxPeerIfFull]
= xref:CConnman.adoc[CConnman]::EvictTxPeerIfFull
:relfileprefix: ../
:mrdocs:

If we are at capacity for inbound tx&hyphen;relay peers, attempt to evict one&period;

== Synopsis

Declared in `&lt;net&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f950f5feb08), requires&lowbar;capability(0x7f950ed87338), requires&lowbar;capability(0x7f950b48f5a8), requires&lowbar;capability(0x7f95034d21c8), requires&lowbar;capability(0x7f950e20f598), requires&lowbar;capability(0x7f9527747238), requires&lowbar;capability(0x7f950c3243c8), requires&lowbar;capability(0x7f950c23fff8), requires&lowbar;capability(0x7f95018b97a8), requires&lowbar;capability(0x7f950bd91658), requires&lowbar;capability(0x7f95065c8d58)&rsqb;&rsqb;
bool
EvictTxPeerIfFull(std::optional&lt;NodeId&gt; protect&lowbar;peer = std&colon;&colon;nullopt);
----

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *protect&lowbar;peer* [in]
| NodeId of a peer we want to protect
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
