From 944d7c3db728ad389ed98fc59d20520bbcebd16d Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Fri, 29 Nov 2019 18:39:06 +0000 Subject: [PATCH] remove last dependency on 'getbalance' RPC --- mmgen/regtest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mmgen/regtest.py b/mmgen/regtest.py index 31d2c2ce..a4614575 100755 --- a/mmgen/regtest.py +++ b/mmgen/regtest.py @@ -115,8 +115,9 @@ def get_balances(): g.testnet = True rpc_init() for u in (user1,user2): - bal = g.proto.coin_amt(g.rpch.getbalance('*',0,True)) - if u == user1: user(user2) + bal = sum(e['amount'] for e in g.rpch.listunspent(0)) + if u == user1: + user(user2) msg('{:<16} {:12}'.format(u.capitalize()+"'s balance:",bal)) tbal += bal msg('{:<16} {:12}'.format('Total balance:',tbal))