aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/net.cpp
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-02-01 23:56:20 +0100
committerJon Atack <jon@atack.com>2021-02-02 00:16:04 +0100
commit0dbde700a6e9894a8ead20f2eebd0ff6554ef2d9 (patch)
treea3b1dcd90449da31658189b8f3d1ffc56ab176f4 /src/rpc/net.cpp
parent1c3af37881adbbc37fb9924bcf69c403fcae1ae7 (diff)
downloadbitcoin-0dbde700a6e9894a8ead20f2eebd0ff6554ef2d9.tar.xz
rpc: use GetNetworkNames() in getnetworkinfo and getpeerinfo helps
Diffstat (limited to 'src/rpc/net.cpp')
-rw-r--r--src/rpc/net.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 47d77b341a..e83f66dd12 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -104,7 +104,7 @@ static RPCHelpMan getpeerinfo()
{RPCResult::Type::STR, "addr", "(host:port) The IP address and port of the peer"},
{RPCResult::Type::STR, "addrbind", "(ip:port) Bind address of the connection to the peer"},
{RPCResult::Type::STR, "addrlocal", "(ip:port) Local address as reported by the peer"},
- {RPCResult::Type::STR, "network", "Network (ipv4, ipv6, or onion) the peer connected through"},
+ {RPCResult::Type::STR, "network", "Network (" + Join(GetNetworkNames(/* append_unroutable */ true), ", ") + ")"},
{RPCResult::Type::NUM, "mapped_as", "The AS in the BGP route to the peer used for diversifying\n"
"peer selection (only available if the asmap config flag is set)"},
{RPCResult::Type::STR_HEX, "services", "The services offered"},
@@ -587,7 +587,7 @@ static RPCHelpMan getnetworkinfo()
{
{RPCResult::Type::OBJ, "", "",
{
- {RPCResult::Type::STR, "name", "network (ipv4, ipv6 or onion)"},
+ {RPCResult::Type::STR, "name", "network (" + Join(GetNetworkNames(), ", ") + ")"},
{RPCResult::Type::BOOL, "limited", "is the network limited using -onlynet?"},
{RPCResult::Type::BOOL, "reachable", "is the network reachable?"},
{RPCResult::Type::STR, "proxy", "(\"host:port\") the proxy that is used for this network, or empty if none"},