aboutsummaryrefslogtreecommitdiff
path: root/src/netaddress.cpp
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2021-06-04 16:09:25 +0200
committerVasil Dimov <vd@FreeBSD.org>2021-06-04 16:09:25 +0200
commita164cd3ba694ffeba03b2887a411b7f82f6c087e (patch)
tree22ba6a8cb31b3cce82adad6c71541fda499985e6 /src/netaddress.cpp
parenta748782a11f0b23f8dcdf167f45d68c863524887 (diff)
downloadbitcoin-a164cd3ba694ffeba03b2887a411b7f82f6c087e.tar.xz
net: simplify CNetAddr::IsRoutable()
Reduce the condition `IsRFC4193() && !IsTor()` to `IsRFC4193()`. We know that if `IsRFC4193()` is `true` then, for sure, the address is not Tor, so `!IsTor()` is also `true`.
Diffstat (limited to 'src/netaddress.cpp')
-rw-r--r--src/netaddress.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netaddress.cpp b/src/netaddress.cpp
index 0ae8dd0698..a358f0db0c 100644
--- a/src/netaddress.cpp
+++ b/src/netaddress.cpp
@@ -489,7 +489,7 @@ bool CNetAddr::IsValid() const
*/
bool CNetAddr::IsRoutable() const
{
- return IsValid() && !(IsRFC1918() || IsRFC2544() || IsRFC3927() || IsRFC4862() || IsRFC6598() || IsRFC5737() || (IsRFC4193() && !IsTor()) || IsRFC4843() || IsRFC7343() || IsLocal() || IsInternal());
+ return IsValid() && !(IsRFC1918() || IsRFC2544() || IsRFC3927() || IsRFC4862() || IsRFC6598() || IsRFC5737() || IsRFC4193() || IsRFC4843() || IsRFC7343() || IsLocal() || IsInternal());
}
/**