0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-02 09:46:52 -05:00

net: add I2P to the reachability map

Update `CNetAddr::GetReachabilityFrom()` to recognize the I2P network so
that we would prefer to advertise our I2P address to I2P peers.
This commit is contained in:
Vasil Dimov 2020-12-09 05:24:09 +01:00
parent 76c35c60f3
commit 9559bd1404
No known key found for this signature in database
GPG key ID: 54DF06F64B55CBBF

View file

@ -878,6 +878,11 @@ int CNetAddr::GetReachabilityFrom(const CNetAddr *paddrPartner) const
case NET_IPV4: return REACH_IPV4; // Tor users can connect to IPv4 as well
case NET_ONION: return REACH_PRIVATE;
}
case NET_I2P:
switch (ourNet) {
case NET_I2P: return REACH_PRIVATE;
default: return REACH_DEFAULT;
}
case NET_TEREDO:
switch(ourNet) {
default: return REACH_DEFAULT;