21 std::vector<NodeEvictionCandidate> eviction_candidates;
23 eviction_candidates.push_back({
42 const std::vector<NodeEvictionCandidate> eviction_candidates_copy = eviction_candidates;
43 const std::optional<NodeId> node_to_evict =
SelectNodeToEvict(std::move(eviction_candidates));
45 assert(std::any_of(eviction_candidates_copy.begin(), eviction_candidates_copy.end(), [&node_to_evict](
const NodeEvictionCandidate& eviction_candidate) { return *node_to_evict == eviction_candidate.id; }));
T PickValueInArray(const T(&array)[size])
std::optional< NodeId > SelectNodeToEvict(std::vector< NodeEvictionCandidate > &&vEvictionCandidates)
Select an inbound peer to evict after filtering out (protecting) peers having distinct,...
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
FUZZ_TARGET(node_eviction)
constexpr ConnectionType ALL_CONNECTION_TYPES[]
constexpr auto ALL_NETWORKS
FuzzedDataProvider & fuzzed_data_provider