MCPcopy Create free account
hub / github.com/LUX-Core/lux / Match

Method Match

src/netbase.cpp:1281–1289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1279}
1280
1281bool CSubNet::Match(const CNetAddr& addr) const
1282{
1283 if (!valid || !addr.IsValid())
1284 return false;
1285 for (int x = 0; x < 16; ++x)
1286 if ((addr.ip[x] & netmask[x]) != network.ip[x])
1287 return false;
1288 return true;
1289}
1290
1291std::string CSubNet::ToString() const
1292{

Callers 4

ClientAllowedFunction · 0.45
FindNodeFunction · 0.45
IsBannedMethod · 0.45
IsWhitelistedRangeMethod · 0.45

Calls 1

IsValidMethod · 0.45

Tested by

no test coverage detected