diff options
author | Kiminuo <kiminuo@protonmail.com> | 2021-05-17 16:38:02 +0200 |
---|---|---|
committer | Kiminuo <kiminuo@protonmail.com> | 2021-05-21 14:33:40 +0200 |
commit | 525448df9dc2ab6b7e960ff138956ae3e2efdf60 (patch) | |
tree | 562d16a81bfdb229a10d8daf0dd5527ade965a1d /test/functional | |
parent | 1ed859e90e18384376e3a1ff0cb76f3e9ab11c2d (diff) |
Move COINBASE_MATURITY from `feature_nulldummy` test to `blocktools`.
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/feature_nulldummy.py | 9 | ||||
-rw-r--r-- | test/functional/test_framework/blocktools.py | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/test/functional/feature_nulldummy.py b/test/functional/feature_nulldummy.py index c7981d31dc..02e387c7ee 100755 --- a/test/functional/feature_nulldummy.py +++ b/test/functional/feature_nulldummy.py @@ -14,13 +14,18 @@ Generate COINBASE_MATURITY (CB) more blocks to ensure the coinbases are mature. """ import time -from test_framework.blocktools import NORMAL_GBT_REQUEST_PARAMS, create_block, create_transaction, add_witness_commitment +from test_framework.blocktools import ( + COINBASE_MATURITY, + NORMAL_GBT_REQUEST_PARAMS, + add_witness_commitment, + create_block, + create_transaction, +) from test_framework.messages import CTransaction from test_framework.script import CScript from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error -COINBASE_MATURITY = 100 NULLDUMMY_ERROR = "non-mandatory-script-verify-flag (Dummy CHECKMULTISIG argument must be zero)" def trueDummy(tx): diff --git a/test/functional/test_framework/blocktools.py b/test/functional/test_framework/blocktools.py index d08e025178..e91b44e776 100644 --- a/test/functional/test_framework/blocktools.py +++ b/test/functional/test_framework/blocktools.py @@ -52,6 +52,9 @@ MAX_BLOCK_SIGOPS_WEIGHT = MAX_BLOCK_SIGOPS * WITNESS_SCALE_FACTOR # Genesis block time (regtest) TIME_GENESIS_BLOCK = 1296688602 +# Coinbase transaction outputs can only be spent after this number of new blocks (network rule) +COINBASE_MATURITY = 100 + # From BIP141 WITNESS_COMMITMENT_HEADER = b"\xaa\x21\xa9\xed" |