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

Function GetExtNetwork

src/netaddress.cpp:396–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394static const int NET_UNKNOWN = NET_MAX + 0;
395static const int NET_TEREDO = NET_MAX + 1;
396int static GetExtNetwork(const CNetAddr *addr)
397{
398 if (addr == nullptr)
399 return NET_UNKNOWN;
400 if (addr->IsRFC4380())
401 return NET_TEREDO;
402 return addr->GetNetwork();
403}
404
405/** Calculates a metric for how reachable (*this) is from a given partner */
406int 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