Skip to content

Commit

Permalink
test: coverage for getbalances#total field in wallet_avoidreuse
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatack committed Nov 22, 2024
1 parent e986efe commit 4a09c0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/functional/wallet_avoidreuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ def assert_unspent(node, total_count=None, total_sum=None, reused_supported=None

def assert_balances(node, mine, margin=0.001):
'''Make assertions about a node's getbalances output'''
got = node.getbalances()["mine"]
got, total = node.getbalances()["mine"], 0
for k,v in mine.items():
assert_approx(got[k], v, margin)
total += v
assert_approx(node.getbalances()["total"], total, margin)

class AvoidReuseTest(BitcoinTestFramework):
def add_options(self, parser):
Expand Down

0 comments on commit 4a09c0f

Please sign in to comment.