Skip to content

Commit 4b7f959

Browse files
committed
test: coverage for getbalances#total field in wallet_avoidreuse
1 parent 6cfb73e commit 4b7f959

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/functional/wallet_avoidreuse.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ def assert_unspent(node, total_count=None, total_sum=None, reused_supported=None
5959

6060
def assert_balances(node, mine, margin=0.001):
6161
'''Make assertions about a node's getbalances output'''
62-
got = node.getbalances()["mine"]
62+
got, total = node.getbalances()["mine"], 0
6363
for k,v in mine.items():
6464
assert_approx(got[k], v, margin)
65+
total += v
66+
assert_approx(node.getbalances()["total"], total, margin)
6567

6668
class AvoidReuseTest(BitcoinTestFramework):
6769
def add_options(self, parser):

0 commit comments

Comments
 (0)