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

Function GetNetworkNames

src/netbase.cpp:121–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121std::vector<std::string> GetNetworkNames(bool append_unroutable)
122{
123 std::vector<std::string> names;
124 for (int n = 0; n < NET_MAX; ++n) {
125 const enum Network network{static_cast<Network>(n)};
126 if (network == NET_UNROUTABLE || network == NET_INTERNAL) continue;
127 names.emplace_back(GetNetworkName(network));
128 }
129 if (append_unroutable) {
130 names.emplace_back(GetNetworkName(NET_UNROUTABLE));
131 }
132 return names;
133}
134
135static bool LookupIntern(const std::string& name, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions, bool fAllowLookup, DNSLookupFn dns_lookup_function)
136{

Callers 4

SetupServerArgsFunction · 0.85
getpeerinfoFunction · 0.85
getnetworkinfoFunction · 0.85
getnodeaddressesFunction · 0.85

Calls 2

GetNetworkNameFunction · 0.85
emplace_backMethod · 0.80

Tested by

no test coverage detected