@@ -25,12 +25,6 @@ def run_test(self):
25
25
"""Main test logic"""
26
26
self .nodes [0 ].generate (BLOCKS )
27
27
28
- if self .is_wallet_compiled ():
29
- self .log .info ("Compare responses from getwalletinfo RPC and `bitcoin-cli getwalletinfo`" )
30
- cli_response = self .nodes [0 ].cli .getwalletinfo ()
31
- rpc_response = self .nodes [0 ].getwalletinfo ()
32
- assert_equal (cli_response , rpc_response )
33
-
34
28
self .log .info ("Compare responses from getblockchaininfo RPC and `bitcoin-cli getblockchaininfo`" )
35
29
cli_response = self .nodes [0 ].cli .getblockchaininfo ()
36
30
rpc_response = self .nodes [0 ].getblockchaininfo ()
@@ -59,7 +53,6 @@ def run_test(self):
59
53
cli_get_info = self .nodes [0 ].cli ('-getinfo' ).send_cli ()
60
54
network_info = self .nodes [0 ].getnetworkinfo ()
61
55
blockchain_info = self .nodes [0 ].getblockchaininfo ()
62
-
63
56
assert_equal (cli_get_info ['version' ], network_info ['version' ])
64
57
assert_equal (cli_get_info ['blocks' ], blockchain_info ['blocks' ])
65
58
assert_equal (cli_get_info ['timeoffset' ], network_info ['timeoffset' ])
@@ -69,15 +62,16 @@ def run_test(self):
69
62
assert_equal (cli_get_info ['chain' ], blockchain_info ['chain' ])
70
63
71
64
if self .is_wallet_compiled ():
72
- self .log .info ("Test -getinfo returns expected wallet info" )
65
+ self .log .info ("Test -getinfo and bitcoin-cli getwalletinfo return expected wallet info" )
73
66
assert_equal (cli_get_info ['balance' ], BALANCE )
74
67
wallet_info = self .nodes [0 ].getwalletinfo ()
75
68
assert_equal (cli_get_info ['keypoolsize' ], wallet_info ['keypoolsize' ])
76
69
assert_equal (cli_get_info ['paytxfee' ], wallet_info ['paytxfee' ])
77
70
assert_equal (cli_get_info ['relayfee' ], network_info ['relayfee' ])
78
71
# unlocked_until is not tested because the wallet is not encrypted
72
+ assert_equal (self .nodes [0 ].cli .getwalletinfo (), wallet_info )
79
73
else :
80
- self .log .info ("*** Wallet not compiled; -getinfo wallet tests skipped" )
74
+ self .log .info ("*** Wallet not compiled; cli getwalletinfo and -getinfo wallet tests skipped" )
81
75
82
76
self .stop_node (0 )
83
77
0 commit comments