From 4a09c0f062138f00fbbd9cf7b50660460d439665 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Fri, 22 Nov 2024 08:45:31 -0600 Subject: [PATCH] test: coverage for getbalances#total field in wallet_avoidreuse --- test/functional/wallet_avoidreuse.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/functional/wallet_avoidreuse.py b/test/functional/wallet_avoidreuse.py index bba79d0a258ed8..a0665755e0c584 100755 --- a/test/functional/wallet_avoidreuse.py +++ b/test/functional/wallet_avoidreuse.py @@ -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):