mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-26 22:08:58 +01:00
[RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user