aboutsummaryrefslogtreecommitdiff
path: root/src/netaddress.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/netaddress.h')
-rw-r--r--src/netaddress.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/netaddress.h b/src/netaddress.h
index 5e67d843e2..428ab87423 100644
--- a/src/netaddress.h
+++ b/src/netaddress.h
@@ -189,6 +189,13 @@ public:
bool IsValid() const;
/**
+ * Whether this object is a privacy network.
+ * TODO: consider adding IsCJDNS() here when more peers adopt CJDNS, see:
+ * https://github.com/bitcoin/bitcoin/pull/27411#issuecomment-1497176155
+ */
+ [[nodiscard]] bool IsPrivacyNet() const { return IsTor() || IsI2P(); }
+
+ /**
* Check if the current object can be serialized in pre-ADDRv2/BIP155 format.
*/
bool IsAddrV1Compatible() const;