Skip to content

Commit 525448d

Browse files
committed
Move COINBASE_MATURITY from feature_nulldummy test to blocktools.
1 parent 1ed859e commit 525448d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

test/functional/feature_nulldummy.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@
1414
"""
1515
import time
1616

17-
from test_framework.blocktools import NORMAL_GBT_REQUEST_PARAMS, create_block, create_transaction, add_witness_commitment
17+
from test_framework.blocktools import (
18+
COINBASE_MATURITY,
19+
NORMAL_GBT_REQUEST_PARAMS,
20+
add_witness_commitment,
21+
create_block,
22+
create_transaction,
23+
)
1824
from test_framework.messages import CTransaction
1925
from test_framework.script import CScript
2026
from test_framework.test_framework import BitcoinTestFramework
2127
from test_framework.util import assert_equal, assert_raises_rpc_error
2228

23-
COINBASE_MATURITY = 100
2429
NULLDUMMY_ERROR = "non-mandatory-script-verify-flag (Dummy CHECKMULTISIG argument must be zero)"
2530

2631
def trueDummy(tx):

test/functional/test_framework/blocktools.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
# Genesis block time (regtest)
5353
TIME_GENESIS_BLOCK = 1296688602
5454

55+
# Coinbase transaction outputs can only be spent after this number of new blocks (network rule)
56+
COINBASE_MATURITY = 100
57+
5558
# From BIP141
5659
WITNESS_COMMITMENT_HEADER = b"\xaa\x21\xa9\xed"
5760

0 commit comments

Comments
 (0)