21 std::vector<NodeEvictionCandidate> eviction_candidates;
23 eviction_candidates.push_back({
26 std::chrono::microseconds{fuzzed_data_provider.
ConsumeIntegral<int64_t>()},
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; }));
std::optional< NodeId > SelectNodeToEvict(std::vector< NodeEvictionCandidate > &&vEvictionCandidates)
Select an inbound peer to evict after filtering out (protecting) peers having distinct,...