diff options
author | Jon Atack <jon@atack.com> | 2022-01-26 09:01:42 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2022-01-26 09:19:23 +0100 |
commit | f7b8094d611531c6b41a94715dbc01f56257ccd2 (patch) | |
tree | 371e4619fd9dad8f1d7c86349370f6a5a59ed168 /src/net.h | |
parent | dd405add6ecff44bde3924ff7bfa4719b36f3596 (diff) | |
download | bitcoin-f7b8094d611531c6b41a94715dbc01f56257ccd2.tar.xz |
p2p: extend inbound eviction protection by network to CJDNS peers
This commit extends our inbound eviction protection to CJDNS peers to
favorise the diversity of peer connections, as peers connected
through the CJDNS network are otherwise disadvantaged by our eviction
criteria for their higher latency (higher min ping times) relative
to IPv4 and IPv6 peers.
The `networks` array is order-dependent in the case of a tie in
candidate counts between networks; earlier array members receive
priority in the case of a tie.
Therefore, we place CJDNS candidates before I2P, localhost, and onion
ones in terms of opportunity to recover unused remaining protected
slots from the previous iteration, estimating that most nodes allowing
several inbound privacy networks will have more onion, localhost or
I2P peers than CJDNS ones, as CJDNS support is only being added in the
upcoming v23.0 release.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1307,6 +1307,8 @@ struct NodeEvictionCandidate * * - I2P peers * + * - CJDNS peers + * * This helps protect these privacy network peers, which tend to be otherwise * disadvantaged under our eviction criteria for their higher min ping times * relative to IPv4/IPv6 peers, and favorise the diversity of peer connections. |