aboutsummaryrefslogtreecommitdiff
path: root/src/test/rpc_tests.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2016-10-23 05:35:52 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2016-10-24 10:23:58 +0000
commit54cf99745ffa8f437c63f9f86c5c9d5e6bb04028 (patch)
treeabaf6e9784f480f2218134d4cb4e71586a5a2acf /src/test/rpc_tests.cpp
parentb2b33d9017cd7bc92099338773313fdf4572dc4a (diff)
downloadbitcoin-54cf99745ffa8f437c63f9f86c5c9d5e6bb04028.tar.xz
RPC/Net: Use boolean consistently for networkactive, and remove from getinfo
Diffstat (limited to 'src/test/rpc_tests.cpp')
-rw-r--r--src/test/rpc_tests.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index 03594878ed..c98d4b11d9 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -86,21 +86,21 @@ BOOST_AUTO_TEST_CASE(rpc_togglenetwork)
UniValue r;
r = CallRPC("getnetworkinfo");
- int netState = find_value(r.get_obj(), "networkactive").get_int();
- BOOST_CHECK_EQUAL(netState, 1);
+ bool netState = find_value(r.get_obj(), "networkactive").get_bool();
+ BOOST_CHECK_EQUAL(netState, true);
BOOST_CHECK_NO_THROW(CallRPC("setnetworkactive false"));
r = CallRPC("getnetworkinfo");
int numConnection = find_value(r.get_obj(), "connections").get_int();
BOOST_CHECK_EQUAL(numConnection, 0);
- netState = find_value(r.get_obj(), "networkactive").get_int();
- BOOST_CHECK_EQUAL(netState, 0);
+ netState = find_value(r.get_obj(), "networkactive").get_bool();
+ BOOST_CHECK_EQUAL(netState, false);
BOOST_CHECK_NO_THROW(CallRPC("setnetworkactive true"));
r = CallRPC("getnetworkinfo");
- netState = find_value(r.get_obj(), "networkactive").get_int();
- BOOST_CHECK_EQUAL(netState, 1);
+ netState = find_value(r.get_obj(), "networkactive").get_bool();
+ BOOST_CHECK_EQUAL(netState, true);
}
BOOST_AUTO_TEST_CASE(rpc_rawsign)