aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-10-11 11:49:08 +0200
committerJon Atack <jon@atack.com>2020-10-15 19:21:41 +0200
commit9a75e1e5697476058b56cd8014a36de31bfecd4c (patch)
tree78d10d529c1a4f4806353172d7c464a97545e287 /src/rpc
parentba8997fb2eda73603ce457bfec668cb7e0acbc89 (diff)
rpc: update GetNetworksInfo() to not return unsupported networks
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/net.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 43c525b6a0..ea08ddfeda 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -486,11 +486,9 @@ static RPCHelpMan getnettotals()
static UniValue GetNetworksInfo()
{
UniValue networks(UniValue::VARR);
- for(int n=0; n<NET_MAX; ++n)
- {
+ for (int n = 0; n < NET_MAX; ++n) {
enum Network network = static_cast<enum Network>(n);
- if(network == NET_UNROUTABLE || network == NET_INTERNAL)
- continue;
+ if (network == NET_UNROUTABLE || network == NET_I2P || network == NET_CJDNS || network == NET_INTERNAL) continue;
proxyType proxy;
UniValue obj(UniValue::VOBJ);
GetProxy(network, proxy);