mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
net: update GetNetworkName() with all enum Network cases
This commit is contained in:
parent
0d22482353
commit
ba8997fb2e
1 changed files with 11 additions and 5 deletions
|
@ -52,14 +52,20 @@ enum Network ParseNetwork(const std::string& net_in) {
|
|||
return NET_UNROUTABLE;
|
||||
}
|
||||
|
||||
std::string GetNetworkName(enum Network net) {
|
||||
switch(net)
|
||||
{
|
||||
std::string GetNetworkName(enum Network net)
|
||||
{
|
||||
switch (net) {
|
||||
case NET_UNROUTABLE: return "unroutable";
|
||||
case NET_IPV4: return "ipv4";
|
||||
case NET_IPV6: return "ipv6";
|
||||
case NET_ONION: return "onion";
|
||||
default: return "";
|
||||
}
|
||||
case NET_I2P: return "i2p";
|
||||
case NET_CJDNS: return "cjdns";
|
||||
case NET_INTERNAL: return "internal";
|
||||
case NET_MAX: assert(false);
|
||||
} // no default case, so the compiler can warn about missing cases
|
||||
|
||||
assert(false);
|
||||
}
|
||||
|
||||
bool static LookupIntern(const std::string& name, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions, bool fAllowLookup)
|
||||
|
|
Loading…
Reference in a new issue