Skip to content

Commit e6890fc

Browse files
committed
net: don't skip CJDNS from GetNetworksInfo()
1 parent e9d90d3 commit e6890fc

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/rpc/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ static UniValue GetNetworksInfo()
566566
UniValue networks(UniValue::VARR);
567567
for (int n = 0; n < NET_MAX; ++n) {
568568
enum Network network = static_cast<enum Network>(n);
569-
if (network == NET_UNROUTABLE || network == NET_CJDNS || network == NET_INTERNAL) continue;
569+
if (network == NET_UNROUTABLE || network == NET_INTERNAL) continue;
570570
proxyType proxy;
571571
UniValue obj(UniValue::VOBJ);
572572
GetProxy(network, proxy);

test/functional/feature_proxy.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@
5050
NET_IPV6 = "ipv6"
5151
NET_ONION = "onion"
5252
NET_I2P = "i2p"
53+
NET_CJDNS = "cjdns"
5354

5455
# Networks returned by RPC getnetworkinfo, defined in src/rpc/net.cpp::GetNetworksInfo()
55-
NETWORKS = frozenset({NET_IPV4, NET_IPV6, NET_ONION, NET_I2P})
56+
NETWORKS = frozenset({NET_IPV4, NET_IPV6, NET_ONION, NET_I2P, NET_CJDNS})
5657

5758

5859
class ProxyTest(BitcoinTestFramework):
@@ -214,6 +215,7 @@ def networks_dict(d):
214215
assert_equal(n0[net]['proxy_randomize_credentials'], expected_randomize)
215216
assert_equal(n0['onion']['reachable'], True)
216217
assert_equal(n0['i2p']['reachable'], False)
218+
assert_equal(n0['cjdns']['reachable'], False)
217219

218220
n1 = networks_dict(self.nodes[1].getnetworkinfo())
219221
assert_equal(NETWORKS, n1.keys())
@@ -240,6 +242,7 @@ def networks_dict(d):
240242
assert_equal(n2[net]['proxy_randomize_credentials'], expected_randomize)
241243
assert_equal(n2['onion']['reachable'], True)
242244
assert_equal(n2['i2p']['reachable'], False)
245+
assert_equal(n2['cjdns']['reachable'], False)
243246

244247
if self.have_ipv6:
245248
n3 = networks_dict(self.nodes[3].getnetworkinfo())
@@ -253,6 +256,7 @@ def networks_dict(d):
253256
assert_equal(n3[net]['proxy_randomize_credentials'], False)
254257
assert_equal(n3['onion']['reachable'], False)
255258
assert_equal(n3['i2p']['reachable'], False)
259+
assert_equal(n3['cjdns']['reachable'], False)
256260

257261

258262
if __name__ == '__main__':

test/functional/interface_bitcoin_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def run_test(self):
136136
network_info = self.nodes[0].getnetworkinfo()
137137
cli_get_info_string = self.nodes[0].cli('-getinfo').send_cli()
138138
cli_get_info = cli_get_info_string_to_dict(cli_get_info_string)
139-
assert_equal(cli_get_info["Proxies"], "127.0.0.1:9050 (ipv4, ipv6, onion), 127.0.0.1:7656 (i2p)")
139+
assert_equal(cli_get_info["Proxies"], "127.0.0.1:9050 (ipv4, ipv6, onion, cjdns), 127.0.0.1:7656 (i2p)")
140140

141141
if self.is_wallet_compiled():
142142
self.log.info("Test -getinfo and bitcoin-cli getwalletinfo return expected wallet info")

0 commit comments

Comments
 (0)