Skip to content
Bitcoin Roots

v29.4-roots.1 · Commit 3: [PATCH 03/13] policy: restore conservative relay and network controls

src/node/eviction.h

Before: src/node/eviction.h · After: src/node/eviction.h

File metadata
index 1bb32e5327a2026823bdd7754b3399f6be602ed8..4727e05f0e419e823da6db894d54d2e349d846c1 100644

Download original patch · Release notes

Diff rows 1–13 of 13. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/node/eviction.h CHANGED
@@ -38,8 +38,12 @@ struct NodeEvictionCandidate {
38
38
  * fixed numbers of desirable peers per various criteria, followed by (mostly)
39
39
  * ratios of desirable or disadvantaged peers. If any eviction candidates
40
40
  * remain, the selection logic chooses a peer to evict.
41
+ * @param[in] force Attempt to evict a random peer if no candidates
42
+ * are available among inbound no-ban connections.
43
+ * (see CConman::AttemptToEvictConnection())
44
+ * Default: false
41
45
  */
42
- [[nodiscard]] std::optional<NodeId> SelectNodeToEvict(std::vector<NodeEvictionCandidate>&& vEvictionCandidates);
46
+ [[nodiscard]] std::optional<NodeId> SelectNodeToEvict(std::vector<NodeEvictionCandidate>&& vEvictionCandidates, bool force = false);
43
47
 
44
48
  /** Protect desirable or disadvantaged inbound peers from eviction by ratio.
45
49
  *