From 702ae1e21a09d8c31406839c4ea507c5fa276898 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Tue, 26 Jun 2018 17:21:30 -0400 Subject: [RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts. --- test/functional/wallet_basic.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/functional/wallet_basic.py') diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py index d6a64eaefb..92aec200c9 100755 --- a/test/functional/wallet_basic.py +++ b/test/functional/wallet_basic.py @@ -64,6 +64,15 @@ class WalletTest(BitcoinTestFramework): assert_equal(self.nodes[1].getbalance(), 50) assert_equal(self.nodes[2].getbalance(), 0) + # Check getbalance with different arguments + assert_equal(self.nodes[0].getbalance("*"), 50) + assert_equal(self.nodes[0].getbalance("*", 1), 50) + assert_equal(self.nodes[0].getbalance("*", 1, True), 50) + assert_equal(self.nodes[0].getbalance(minconf=1), 50) + + # first argument of getbalance must be excluded or set to "*" + assert_raises_rpc_error(-32, "dummy first argument must be excluded or set to \"*\"", self.nodes[0].getbalance, "") + # Check that only first and second nodes have UTXOs utxos = self.nodes[0].listunspent() assert_equal(len(utxos), 1) -- cgit v1.2.3