mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge bitcoin/bitcoin#24165: p2p: extend inbound eviction protection by network to CJDNS peers
b7be28cac5test: add combined CJDNS/I2P/localhost/onion eviction protection tests (Jon Atack)0a1bb84770test: add tests for inbound eviction protection of CJDNS peers (Jon Atack)0c00c0c981test: fix off-by-one logic in an eviction protection test (Jon Atack)f7b8094d61p2p: extend inbound eviction protection by network to CJDNS peers (Jon Atack) Pull request description: Extend inbound eviction protection for peers connected over CJDNS, as is the case for peers connected via onion, localhost, and I2P since #21261 and #20197. CJDNS peers seem to have better min ping latency than onion and I2P peers but still higher than that of unencrypted IPv4/6 peers and can be disadvantaged under our eviction criteria. They are also very few in number, which is a further reason to protect them, as the goal of this logic is to favorise the diversity of our peer connections. CJDNS support was added in #23077 for the upcoming v23 release. ACKs for top commit: laanwj: Concept and code review ACKb7be28cac5w0xlt: tACKb7be28cTree-SHA512: 89ebdd217602e16ae14b9bd0d5a25fc09f9b2384c951f820bc0f5a6d8452bbc9042065db817d5d5296c0ad22988491a83fc5b9a611e660c40ebd4f03448c4061
This commit is contained in:
@@ -1316,6 +1316,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.
|
||||
|
||||
Reference in New Issue
Block a user