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

Method Match

src/netaddress.cpp:634–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632}
633
634bool CSubNet::Match(const CNetAddr &addr) const
635{
636 if (!valid || !addr.IsValid())
637 return false;
638 for(int x=0; x<16; ++x)
639 if ((addr.ip[x] & netmask[x]) != network.ip[x])
640 return false;
641 return true;
642}
643
644static inline int NetmaskBits(uint8_t x)
645{

Callers 5

ClientAllowedFunction · 0.45
FindNodeMethod · 0.45
IsBannedMethod · 0.45
BanMethod · 0.45
IsWhitelistedRangeMethod · 0.45

Calls 1

IsValidMethod · 0.45

Tested by

no test coverage detected