@@ -1228,20 +1228,18 @@ struct NodeEvictionCandidate
1228
1228
* longest, to replicate the non-eviction implicit behavior and preclude attacks
1229
1229
* that start later.
1230
1230
*
1231
- * Half of these protected spots (1/4 of the total) are reserved for onion peers
1232
- * connected via our tor control service, if any, sorted by longest uptime, even
1233
- * if they're not longest uptime overall. Any remaining slots of the 1/4 are
1234
- * then allocated to protect localhost peers, if any (or up to 2 localhost peers
1235
- * if no slots remain and 2 or more onion peers were protected), sorted by
1236
- * longest uptime, as manually configured hidden services not using
1237
- * `-bind=addr[:port]=onion` will not be detected as inbound onion connections.
1231
+ * Half of these protected spots (1/4 of the total) are reserved for the
1232
+ * following categories of peers, sorted by longest uptime, even if they're not
1233
+ * longest uptime overall:
1238
1234
*
1239
- * This helps protect onion peers, which tend to be otherwise disadvantaged
1240
- * under our eviction criteria for their higher min ping times relative to IPv4
1241
- * and IPv6 peers, and favorise the diversity of peer connections.
1235
+ * - onion peers connected via our tor control service
1242
1236
*
1243
- * This function was extracted from SelectNodeToEvict() to be able to test the
1244
- * ratio-based protection logic deterministically.
1237
+ * - localhost peers, as manually configured hidden services not using
1238
+ * `-bind=addr[:port]=onion` will not be detected as inbound onion connections
1239
+ *
1240
+ * This helps protect these privacy network peers, which tend to be otherwise
1241
+ * disadvantaged under our eviction criteria for their higher min ping times
1242
+ * relative to IPv4/IPv6 peers, and favorise the diversity of peer connections.
1245
1243
*/
1246
1244
void ProtectEvictionCandidatesByRatio (std::vector<NodeEvictionCandidate>& vEvictionCandidates);
1247
1245
0 commit comments