net: relay I2P addresses even if not reachable (by us)

Nodes that can reach the I2P network (have set `-i2psam=`) will relay
I2P addresses even without this patch. However, nodes that can't reach
the I2P network will not. This was done as a precaution in
https://github.com/bitcoin/bitcoin/pull/20119 before anybody could
connect to I2P because then, for sure, it would have been useless.

Now, however, we have I2P support and a bunch of I2P nodes, so get all
nodes on the network to relay I2P addresses to help with propagation,
similarly to what we do with Tor addresses.
This commit is contained in:
Vasil Dimov 2021-06-10 14:16:41 +02:00
parent ef8f2966ac
commit ba45f02708
No known key found for this signature in database
GPG key ID: 54DF06F64B55CBBF

View file

@ -222,7 +222,7 @@ class CNetAddr
*/
bool IsRelayable() const
{
return IsIPv4() || IsIPv6() || IsTor();
return IsIPv4() || IsIPv6() || IsTor() || IsI2P();
}
/**