aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_labels.py
diff options
context:
space:
mode:
authorKiminuo <kiminuo@protonmail.com>2021-05-17 16:38:19 +0200
committerKiminuo <kiminuo@protonmail.com>2021-05-31 07:32:28 +0200
commitbfa9309ad606102f24c9bd3c33dfe78949f09418 (patch)
tree6c21faf3163fe922a6e7724f7837414fcadefc3e /test/functional/wallet_labels.py
parent525448df9dc2ab6b7e960ff138956ae3e2efdf60 (diff)
downloadbitcoin-bfa9309ad606102f24c9bd3c33dfe78949f09418.tar.xz
Use COINBASE_MATURITY constant in functional tests.
Diffstat (limited to 'test/functional/wallet_labels.py')
-rwxr-xr-xtest/functional/wallet_labels.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/wallet_labels.py b/test/functional/wallet_labels.py
index 551eb72720..2d792bac52 100755
--- a/test/functional/wallet_labels.py
+++ b/test/functional/wallet_labels.py
@@ -11,6 +11,7 @@ RPCs tested are:
"""
from collections import defaultdict
+from test_framework.blocktools import COINBASE_MATURITY
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal, assert_raises_rpc_error
from test_framework.wallet_util import test_address
@@ -32,7 +33,7 @@ class WalletLabelsTest(BitcoinTestFramework):
# Note each time we call generate, all generated coins go into
# the same address, so we call twice to get two addresses w/50 each
node.generatetoaddress(nblocks=1, address=node.getnewaddress(label='coinbase'))
- node.generatetoaddress(nblocks=101, address=node.getnewaddress(label='coinbase'))
+ node.generatetoaddress(nblocks=COINBASE_MATURITY + 1, address=node.getnewaddress(label='coinbase'))
assert_equal(node.getbalance(), 100)
# there should be 2 address groups
@@ -104,7 +105,7 @@ class WalletLabelsTest(BitcoinTestFramework):
label.verify(node)
assert_equal(node.getreceivedbylabel(label.name), 2)
label.verify(node)
- node.generate(101)
+ node.generate(COINBASE_MATURITY + 1)
# Check that setlabel can assign a label to a new unused address.
for label in labels:
@@ -124,7 +125,7 @@ class WalletLabelsTest(BitcoinTestFramework):
label.add_address(multisig_address)
label.purpose[multisig_address] = "send"
label.verify(node)
- node.generate(101)
+ node.generate(COINBASE_MATURITY + 1)
# Check that setlabel can change the label of an address from a
# different label.