Skip to content

Commit 0e01514

Browse files
committed
net: remove orphaned CSubNet::SanityCheck()
CSubNet::SanityCheck() was added in #20140, and not removed in #22570 when it became orphaned code.
1 parent 5ecd14a commit 0e01514

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

src/netaddress.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,29 +1106,6 @@ bool CSubNet::IsValid() const
11061106
return valid;
11071107
}
11081108

1109-
bool CSubNet::SanityCheck() const
1110-
{
1111-
switch (network.m_net) {
1112-
case NET_IPV4:
1113-
case NET_IPV6:
1114-
break;
1115-
case NET_ONION:
1116-
case NET_I2P:
1117-
case NET_CJDNS:
1118-
return true;
1119-
case NET_INTERNAL:
1120-
case NET_UNROUTABLE:
1121-
case NET_MAX:
1122-
return false;
1123-
}
1124-
1125-
for (size_t x = 0; x < network.m_addr.size(); ++x) {
1126-
if (network.m_addr[x] & ~netmask[x]) return false;
1127-
}
1128-
1129-
return true;
1130-
}
1131-
11321109
bool operator==(const CSubNet& a, const CSubNet& b)
11331110
{
11341111
return a.valid == b.valid && a.network == b.network && !memcmp(a.netmask, b.netmask, 16);

src/netaddress.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,6 @@ class CSubNet
476476
/// Is this value valid? (only used to signal parse errors)
477477
bool valid;
478478

479-
bool SanityCheck() const;
480-
481479
public:
482480
/**
483481
* Construct an invalid subnet (empty, `Match()` always returns false).

0 commit comments

Comments
 (0)