diff options
author | Pieter Wuille <pieter@wuille.net> | 2020-10-11 00:13:10 -0700 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2020-10-11 11:29:11 -0700 |
commit | 56f9dba015c592b8925795012e3061a710070a27 (patch) | |
tree | 008f2313c14b9a87d9a82ef3bc4df45e593faf0c /src/netaddress.h | |
parent | 79f3d9b932bf62b90995bce1cf4b0b1f0152d26d (diff) |
Only relay IPv4, IPv6, Tor addresses
Diffstat (limited to 'src/netaddress.h')
-rw-r--r-- | src/netaddress.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/netaddress.h b/src/netaddress.h index 3bcf6d35ca..023e83e73d 100644 --- a/src/netaddress.h +++ b/src/netaddress.h @@ -212,6 +212,14 @@ class CNetAddr friend bool operator<(const CNetAddr& a, const CNetAddr& b); /** + * Whether this address should be relayed to other peers even if we can't reach it ourselves. + */ + bool IsRelayable() const + { + return IsIPv4() || IsIPv6() || IsTor(); + } + + /** * Serialize to a stream. */ template <typename Stream> |