Skip to content

Commit a164cd3

Browse files
committed
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`.
1 parent a748782 commit a164cd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/netaddress.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ bool CNetAddr::IsValid() const
489489
*/
490490
bool CNetAddr::IsRoutable() const
491491
{
492-
return IsValid() && !(IsRFC1918() || IsRFC2544() || IsRFC3927() || IsRFC4862() || IsRFC6598() || IsRFC5737() || (IsRFC4193() && !IsTor()) || IsRFC4843() || IsRFC7343() || IsLocal() || IsInternal());
492+
return IsValid() && !(IsRFC1918() || IsRFC2544() || IsRFC3927() || IsRFC4862() || IsRFC6598() || IsRFC5737() || IsRFC4193() || IsRFC4843() || IsRFC7343() || IsLocal() || IsInternal());
493493
}
494494

495495
/**

0 commit comments

Comments
 (0)