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

Method Match

src/netbase.cpp:1082–1089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1080}
1081
1082bool CSubNet::Match(const CNetAddr& addr) const {
1083 if (!valid || !addr.IsValid())
1084 return false;
1085 for (int x = 0; x < 16; ++x)
1086 if ((addr.ip[x] & netmask[x]) != network.ip[x])
1087 return false;
1088 return true;
1089}
1090
1091static inline int32_t NetmaskBits(uint8_t x) {
1092 switch (x) {

Callers

nothing calls this directly

Calls 1

IsValidMethod · 0.45

Tested by

no test coverage detected