aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-03-27 17:20:28 +0100
committerJon Atack <jon@atack.com>2020-04-05 19:40:28 +0200
commit0306d78cb49d1684cc96ba3512b582a1fdaf78cc (patch)
tree7715f86f777902c0b12ad06be7de09c654be0885
parent7eacdc5167c8db94df84e206db85817bc64e4921 (diff)
Use getbalances in wallet_address_types tests
-rwxr-xr-xtest/functional/wallet_address_types.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/functional/wallet_address_types.py b/test/functional/wallet_address_types.py
index 79b6db986b..065764dcac 100755
--- a/test/functional/wallet_address_types.py
+++ b/test/functional/wallet_address_types.py
@@ -97,12 +97,9 @@ class AddressTypeTest(BitcoinTestFramework):
connect_nodes(self.nodes[i], j)
self.sync_all()
- def get_balances(self, confirmed=True):
- """Return a list of confirmed or unconfirmed balances."""
- if confirmed:
- return [self.nodes[i].getbalance() for i in range(4)]
- else:
- return [self.nodes[i].getunconfirmedbalance() for i in range(4)]
+ def get_balances(self, key='trusted'):
+ """Return a list of balances."""
+ return [self.nodes[i].getbalances()['mine'][key] for i in range(4)]
# Quick test of python bech32 implementation
def test_python_bech32(self, addr):
@@ -307,7 +304,7 @@ class AddressTypeTest(BitcoinTestFramework):
self.nodes[from_node].sendmany("", sends)
self.sync_mempools()
- unconf_balances = self.get_balances(False)
+ unconf_balances = self.get_balances('untrusted_pending')
self.log.debug("Check unconfirmed balances: {}".format(unconf_balances))
assert_equal(unconf_balances[from_node], 0)
for n, to_node in enumerate(range(from_node + 1, from_node + 4)):