diff options
author | Kiminuo <kiminuo@protonmail.com> | 2021-05-17 16:38:19 +0200 |
---|---|---|
committer | Kiminuo <kiminuo@protonmail.com> | 2021-05-31 07:32:28 +0200 |
commit | bfa9309ad606102f24c9bd3c33dfe78949f09418 (patch) | |
tree | 6c21faf3163fe922a6e7724f7837414fcadefc3e /test/functional/wallet_address_types.py | |
parent | 525448df9dc2ab6b7e960ff138956ae3e2efdf60 (diff) | |
download | bitcoin-bfa9309ad606102f24c9bd3c33dfe78949f09418.tar.xz |
Use COINBASE_MATURITY constant in functional tests.
Diffstat (limited to 'test/functional/wallet_address_types.py')
-rwxr-xr-x | test/functional/wallet_address_types.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/wallet_address_types.py b/test/functional/wallet_address_types.py index b3bee1876d..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, @@ -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 = {} |