Skip to content

Commit 9a75e1e

Browse files
committed
rpc: update GetNetworksInfo() to not return unsupported networks
1 parent ba8997f commit 9a75e1e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/rpc/net.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,9 @@ static RPCHelpMan getnettotals()
486486
static UniValue GetNetworksInfo()
487487
{
488488
UniValue networks(UniValue::VARR);
489-
for(int n=0; n<NET_MAX; ++n)
490-
{
489+
for (int n = 0; n < NET_MAX; ++n) {
491490
enum Network network = static_cast<enum Network>(n);
492-
if(network == NET_UNROUTABLE || network == NET_INTERNAL)
493-
continue;
491+
if (network == NET_UNROUTABLE || network == NET_I2P || network == NET_CJDNS || network == NET_INTERNAL) continue;
494492
proxyType proxy;
495493
UniValue obj(UniValue::VOBJ);
496494
GetProxy(network, proxy);

0 commit comments

Comments
 (0)