v29.4-roots.4 · Commit 3: [PATCH 03/37] 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. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/node/eviction.h
CHANGED
|
@@ -38,8 +38,12 @@ struct NodeEvictionCandidate {
|
|
| 38 |
* fixed numbers of desirable peers per various criteria, followed by (mostly)
|
| 39 |
* ratios of desirable or disadvantaged peers. If any eviction candidates
|
| 40 |
* remain, the selection logic chooses a peer to evict.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
*/
|
| 42 |
-
[[nodiscard]] std::optional<NodeId> SelectNodeToEvict(std::vector<NodeEvictionCandidate>&& vEvictionCandidates);
|
| 43 |
|
| 44 |
/** Protect desirable or disadvantaged inbound peers from eviction by ratio.
|
| 45 |
*
|
|
|
|
| 38 |
* fixed numbers of desirable peers per various criteria, followed by (mostly)
|
| 39 |
* ratios of desirable or disadvantaged peers. If any eviction candidates
|
| 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
|
| 45 |
*/
|
| 46 |
+
[[nodiscard]] std::optional<NodeId> SelectNodeToEvict(std::vector<NodeEvictionCandidate>&& vEvictionCandidates, bool force = false);
|
| 47 |
|
| 48 |
/** Protect desirable or disadvantaged inbound peers from eviction by ratio.
|
| 49 |
*
|