diff options
author | Jon Atack <jon@atack.com> | 2020-10-11 11:49:08 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2020-10-15 19:21:41 +0200 |
commit | 9a75e1e5697476058b56cd8014a36de31bfecd4c (patch) | |
tree | 78d10d529c1a4f4806353172d7c464a97545e287 /src/rpc | |
parent | ba8997fb2eda73603ce457bfec668cb7e0acbc89 (diff) |
rpc: update GetNetworksInfo() to not return unsupported networks
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/net.cpp | 6 |
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); |