MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / Match

Method Match

src/netbase.cpp:1297–1305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1295}
1296
1297bool CSubNet::Match(const CNetAddr &addr) const
1298{
1299 if (!valid || !addr.IsValid())
1300 return false;
1301 for(int x=0; x<16; ++x)
1302 if ((addr.ip[x] & netmask[x]) != network.ip[x])
1303 return false;
1304 return true;
1305}
1306
1307std::string CSubNet::ToString() const
1308{

Callers 3

ClientAllowedFunction · 0.45
BOOST_FOREACHFunction · 0.45
BOOST_FOREACHFunction · 0.45

Calls 1

IsValidMethod · 0.45

Tested by

no test coverage detected