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

Function GetExtNetwork

src/netbase.cpp:827–833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

825static const int32_t NET_UNKNOWN = NET_MAX + 0;
826static const int32_t NET_TEREDO = NET_MAX + 1;
827static int32_t GetExtNetwork(const CNetAddr* addr) {
828 if (addr == nullptr)
829 return NET_UNKNOWN;
830 if (addr->IsRFC4380())
831 return NET_TEREDO;
832 return addr->GetNetwork();
833}
834
835/** Calculates a metric for how reachable (*this) is from a given partner */
836int32_t CNetAddr::GetReachabilityFrom(const CNetAddr* paddrPartner) const {

Callers 1

GetReachabilityFromMethod · 0.85

Calls 2

IsRFC4380Method · 0.80
GetNetworkMethod · 0.80

Tested by

no test coverage detected