Skip to content

Commit bb13f46

Browse files
committed
test: verify cli.getwalletinfo in wallet section
1 parent becc8b9 commit bb13f46

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

test/functional/interface_bitcoin_cli.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ def run_test(self):
2525
"""Main test logic"""
2626
self.nodes[0].generate(BLOCKS)
2727

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-
3428
self.log.info("Compare responses from getblockchaininfo RPC and `bitcoin-cli getblockchaininfo`")
3529
cli_response = self.nodes[0].cli.getblockchaininfo()
3630
rpc_response = self.nodes[0].getblockchaininfo()
@@ -59,7 +53,6 @@ def run_test(self):
5953
cli_get_info = self.nodes[0].cli('-getinfo').send_cli()
6054
network_info = self.nodes[0].getnetworkinfo()
6155
blockchain_info = self.nodes[0].getblockchaininfo()
62-
6356
assert_equal(cli_get_info['version'], network_info['version'])
6457
assert_equal(cli_get_info['blocks'], blockchain_info['blocks'])
6558
assert_equal(cli_get_info['timeoffset'], network_info['timeoffset'])
@@ -69,15 +62,16 @@ def run_test(self):
6962
assert_equal(cli_get_info['chain'], blockchain_info['chain'])
7063

7164
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")
7366
assert_equal(cli_get_info['balance'], BALANCE)
7467
wallet_info = self.nodes[0].getwalletinfo()
7568
assert_equal(cli_get_info['keypoolsize'], wallet_info['keypoolsize'])
7669
assert_equal(cli_get_info['paytxfee'], wallet_info['paytxfee'])
7770
assert_equal(cli_get_info['relayfee'], network_info['relayfee'])
7871
# unlocked_until is not tested because the wallet is not encrypted
72+
assert_equal(self.nodes[0].cli.getwalletinfo(), wallet_info)
7973
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")
8175

8276
self.stop_node(0)
8377

0 commit comments

Comments
 (0)