[#SelectNodeToEvict] = SelectNodeToEvict :mrdocs: Select an inbound peer to evict after filtering out (protecting) peers having distinct, difficult‐to‐forge characteristics. The protection logic picks out fixed numbers of desirable peers per various criteria, followed by (mostly) ratios of desirable or disadvantaged peers. If any eviction candidates remain, the selection logic chooses a peer to evict. == Synopsis Declared in `<node/eviction.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] std::optional<NodeId> SelectNodeToEvict(std::vector<NodeEvictionCandidate>&& vEvictionCandidates); ---- == Return Value The peer selected for eviction, or std::nullopt if none should be evicted. [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *vEvictionCandidates* | The inbound peers considered for eviction. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#