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

Function GetExtNetwork

src/netbase.cpp:1003–1010  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001static const int NET_UNKNOWN = NET_MAX + 0;
1002static const int NET_TEREDO = NET_MAX + 1;
1003int static GetExtNetwork(const CNetAddr *addr)
1004{
1005 if (addr == NULL)
1006 return NET_UNKNOWN;
1007 if (addr->IsRFC4380())
1008 return NET_TEREDO;
1009 return addr->GetNetwork();
1010}
1011
1012/** Calculates a metric for how reachable (*this) is from a given partner */
1013int 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