mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Use getbalances in wallet_address_types tests
This commit is contained in:
parent
7eacdc5167
commit
0306d78cb4
1 changed files with 4 additions and 7 deletions
|
@ -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)):
|
||||
|
|
Loading…
Reference in a new issue