diff options
Diffstat (limited to 'test/functional/wallet_address_types.py')
-rwxr-xr-x | test/functional/wallet_address_types.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/wallet_address_types.py b/test/functional/wallet_address_types.py index 2db5eae33b..6d93cf412f 100755 --- a/test/functional/wallet_address_types.py +++ b/test/functional/wallet_address_types.py @@ -53,6 +53,7 @@ Test that the nodes generate the correct change address type: from decimal import Decimal import itertools +from test_framework.blocktools import COINBASE_MATURITY from test_framework.test_framework import BitcoinTestFramework from test_framework.descriptors import ( descsum_create, @@ -210,7 +211,7 @@ class AddressTypeTest(BitcoinTestFramework): assert_equal(len(tx["vout"]), len(destinations) + 1) # Make sure the destinations are included, and remove them: - output_addresses = [vout['scriptPubKey']['addresses'][0] for vout in tx["vout"]] + output_addresses = [vout['scriptPubKey']['address'] for vout in tx["vout"]] change_addresses = [d for d in output_addresses if d not in destinations] assert_equal(len(change_addresses), 1) @@ -220,7 +221,7 @@ class AddressTypeTest(BitcoinTestFramework): def run_test(self): # Mine 101 blocks on node5 to bring nodes out of IBD and make sure that # no coinbases are maturing for the nodes-under-test during the test - self.nodes[5].generate(101) + self.nodes[5].generate(COINBASE_MATURITY + 1) self.sync_blocks() uncompressed_1 = "0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee" @@ -258,7 +259,7 @@ class AddressTypeTest(BitcoinTestFramework): self.log.info("Sending from node {} ({}) with{} multisig using {}".format(from_node, self.extra_args[from_node], "" if multisig else "out", "default" if address_type is None else address_type)) old_balances = self.get_balances() self.log.debug("Old balances are {}".format(old_balances)) - to_send = (old_balances[from_node] / 101).quantize(Decimal("0.00000001")) + to_send = (old_balances[from_node] / (COINBASE_MATURITY + 1)).quantize(Decimal("0.00000001")) sends = {} addresses = {} |