File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,9 @@ enum Network ParseNetwork(const std::string& net_in) {
96
96
if (net == " i2p" ) {
97
97
return NET_I2P;
98
98
}
99
+ if (net == " cjdns" ) {
100
+ return NET_CJDNS;
101
+ }
99
102
return NET_UNROUTABLE;
100
103
}
101
104
Original file line number Diff line number Diff line change @@ -339,11 +339,13 @@ BOOST_AUTO_TEST_CASE(netbase_parsenetwork)
339
339
BOOST_CHECK_EQUAL (ParseNetwork (" ipv6" ), NET_IPV6);
340
340
BOOST_CHECK_EQUAL (ParseNetwork (" onion" ), NET_ONION);
341
341
BOOST_CHECK_EQUAL (ParseNetwork (" tor" ), NET_ONION);
342
+ BOOST_CHECK_EQUAL (ParseNetwork (" cjdns" ), NET_CJDNS);
342
343
343
344
BOOST_CHECK_EQUAL (ParseNetwork (" IPv4" ), NET_IPV4);
344
345
BOOST_CHECK_EQUAL (ParseNetwork (" IPv6" ), NET_IPV6);
345
346
BOOST_CHECK_EQUAL (ParseNetwork (" ONION" ), NET_ONION);
346
347
BOOST_CHECK_EQUAL (ParseNetwork (" TOR" ), NET_ONION);
348
+ BOOST_CHECK_EQUAL (ParseNetwork (" CJDNS" ), NET_CJDNS);
347
349
348
350
BOOST_CHECK_EQUAL (ParseNetwork (" :)" ), NET_UNROUTABLE);
349
351
BOOST_CHECK_EQUAL (ParseNetwork (" tÖr" ), NET_UNROUTABLE);
Original file line number Diff line number Diff line change @@ -228,8 +228,8 @@ def test_getnodeaddresses(self):
228
228
assert_equal (res [0 ]["port" ], 8333 )
229
229
assert_equal (res [0 ]["services" ], P2P_SERVICES )
230
230
231
- # Test for the absence of onion and I2P addresses.
232
- for network in ["onion" , "i2p" ]:
231
+ # Test for the absence of onion, I2P and CJDNS addresses.
232
+ for network in ["onion" , "i2p" , "cjdns" ]:
233
233
assert_equal (self .nodes [0 ].getnodeaddresses (0 , network ), [])
234
234
235
235
# Test invalid arguments.
You can’t perform that action at this time.
0 commit comments