diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-02-15 15:31:08 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-02-15 15:31:15 +0100 |
commit | 489030f2a8f89e7ae5031351fc3d0db83e3911ea (patch) | |
tree | 8b168f1aa274bf0c6d9a8eb85c604cc2577a55bf /src/netbase.h | |
parent | cb073bed0056d113fede4510ec68c5a6141ca997 (diff) | |
parent | 96635e61777add29b6a34d47767a63f43b2919af (diff) |
Merge #20965: net, rpc: return NET_UNROUTABLE as not_publicly_routable, automate helps
96635e61777add29b6a34d47767a63f43b2919af init: use GetNetworkNames() in -onlynet help (Jon Atack)
0dbde700a6e9894a8ead20f2eebd0ff6554ef2d9 rpc: use GetNetworkNames() in getnetworkinfo and getpeerinfo helps (Jon Atack)
1c3af37881adbbc37fb9924bcf69c403fcae1ae7 net: create GetNetworkNames() (Jon Atack)
b45eae4d5332f1da71ba9ec983fe7818fa4d32e9 net: update NET_UNROUTABLE to not_publicly_routable in GetNetworkName() (Jon Atack)
Pull request description:
per the IRC discussion today at http://www.erisian.com.au/bitcoin-core-dev/log-2021-01-19.html#l-87
- return a more helpful string name for `Network::NET_UNROUTABLE`: "not_publicly_routable" instead of "unroutable"
- update the RPC getpeerinfo "network" help, and automate it and the getnetworkinfo "network#name" and the -onlynet help doc generation
ACKs for top commit:
theStack:
re-ACK 96635e61777add29b6a34d47767a63f43b2919af 🌳
MarcoFalke:
review ACK 96635e61777add29b6a34d47767a63f43b2919af 🐗
Tree-SHA512: 511a7d987126b48a7a090739aa7c4964b6186a3ff8f5f7eec9233dd816c6b7a6dc91b3ea6b824aa68f218a8a3ebdc6ffd214e9a88af38f2bf23f3257c4284c3a
Diffstat (limited to 'src/netbase.h')
-rw-r--r-- | src/netbase.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/netbase.h b/src/netbase.h index afc373ef49..847a72ca8e 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -42,6 +42,8 @@ public: enum Network ParseNetwork(const std::string& net); std::string GetNetworkName(enum Network net); +/** Return a vector of publicly routable Network names; optionally append NET_UNROUTABLE. */ +std::vector<std::string> GetNetworkNames(bool append_unroutable = false); bool SetProxy(enum Network net, const proxyType &addrProxy); bool GetProxy(enum Network net, proxyType &proxyInfoOut); bool IsProxy(const CNetAddr &addr); |