@@ -19,7 +19,7 @@ PATH_BASE_TEST_FUNCTIONAL = os.path.abspath(os.path.join(PATH_BASE_CONTRIB_SIGNE
19
19
sys .path .insert (0 , PATH_BASE_TEST_FUNCTIONAL )
20
20
21
21
from test_framework .blocktools import get_witness_script , script_BIP34_coinbase_height # noqa: E402
22
- from test_framework .messages import CBlock , CBlockHeader , COutPoint , CTransaction , CTxIn , CTxInWitness , CTxOut , from_binary , from_hex , ser_string , ser_uint256 , tx_from_hex # noqa: E402
22
+ from test_framework .messages import CBlock , CBlockHeader , COutPoint , CTransaction , CTxIn , CTxInWitness , CTxOut , from_binary , from_hex , ser_string , ser_uint256 , tx_from_hex , MAX_SEQUENCE_NONFINAL # noqa: E402
23
23
from test_framework .psbt import PSBT , PSBTMap , PSBT_GLOBAL_UNSIGNED_TX , PSBT_IN_FINAL_SCRIPTSIG , PSBT_IN_FINAL_SCRIPTWITNESS , PSBT_IN_NON_WITNESS_UTXO , PSBT_IN_SIGHASH_TYPE # noqa: E402
24
24
from test_framework .script import CScript , CScriptOp # noqa: E402
25
25
@@ -102,7 +102,8 @@ def generate_psbt(tmpl, reward_spk, *, blocktime=None, poolid=None):
102
102
scriptSig = CScript (b"" + scriptSig + CScriptOp .encode_op_pushdata (poolid ))
103
103
104
104
cbtx = CTransaction ()
105
- cbtx .vin = [CTxIn (COutPoint (0 , 0xffffffff ), scriptSig , 0xffffffff )]
105
+ cbtx .nLockTime = tmpl ["height" ] - 1
106
+ cbtx .vin = [CTxIn (COutPoint (0 , 0xffffffff ), scriptSig , MAX_SEQUENCE_NONFINAL )]
106
107
cbtx .vout = [CTxOut (tmpl ["coinbasevalue" ], reward_spk )]
107
108
cbtx .vin [0 ].nSequence = 2 ** 32 - 2
108
109
cbtx .rehash ()
0 commit comments