MCPcopy Create free account
hub / github.com/ElementsProject/elements / IsAddrV1Compatible

Method IsAddrV1Compatible

src/netaddress.cpp:505–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503}
504
505bool CNetAddr::IsAddrV1Compatible() const
506{
507 switch (m_net) {
508 case NET_IPV4:
509 case NET_IPV6:
510 case NET_INTERNAL:
511 return true;
512 case NET_ONION:
513 case NET_I2P:
514 case NET_CJDNS:
515 return false;
516 case NET_UNROUTABLE: // m_net is never and should not be set to NET_UNROUTABLE
517 case NET_MAX: // m_net is never and should not be set to NET_MAX
518 assert(false);
519 } // no default case, so the compiler can warn about missing cases
520
521 assert(false);
522}
523
524enum Network CNetAddr::GetNetwork() const
525{

Callers 4

IsAddrCompatibleFunction · 0.80
PushNodeVersionMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
deserialize.cppFile · 0.80

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64