MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / GetNetworkName

Function GetNetworkName

src/netbase.cpp:122–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122std::string GetNetworkName(enum Network net) {
123 switch (net) {
124 case NET_UNROUTABLE:
125 return "not_publicly_routable";
126 case NET_IPV4:
127 return "ipv4";
128 case NET_IPV6:
129 return "ipv6";
130 case NET_ONION:
131 return "onion";
132 case NET_I2P:
133 return "i2p";
134 case NET_CJDNS:
135 return "cjdns";
136 case NET_INTERNAL:
137 return "internal";
138 case NET_MAX:
139 assert(false);
140 } // no default case, so the compiler can warn about missing cases
141
142 assert(false);
143}
144
145std::vector<std::string> GetNetworkNames(bool append_unroutable) {
146 std::vector<std::string> names;

Callers 4

GetNetworkNamesFunction · 0.85
getpeerinfoFunction · 0.85
GetNetworksInfoFunction · 0.85
getnodeaddressesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected