aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_basic.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-06-26 17:21:30 -0400
committerJohn Newbery <john@johnnewbery.com>2018-06-29 15:54:24 -0400
commit702ae1e21a09d8c31406839c4ea507c5fa276898 (patch)
tree130f5a8b8ae3b468600b474bd88e0610d1c97080 /test/functional/wallet_basic.py
parentcf15761f6d4526d205126fbf5f088ac8edebeb57 (diff)
[RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts.
Diffstat (limited to 'test/functional/wallet_basic.py')
-rwxr-xr-xtest/functional/wallet_basic.py9
1 files changed, 9 insertions, 0 deletions
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)