Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 5: [PATCH 05/17] feat(net): preserve Roots peer controls and health view on v31

src/node/eviction.h

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

File metadata
index 6ab726445f2384d408b3d635fb74f074bb337e5a..21e14af83bf066dec15a6b2e4d0dda1903324672 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
  *