@@ -19,7 +19,7 @@ PATH_BASE_TEST_FUNCTIONAL = os.path.abspath(os.path.join(PATH_BASE_CONTRIB_SIGNE
1919sys .path .insert (0 , PATH_BASE_TEST_FUNCTIONAL )
2020
2121from 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
2323from 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
2424from test_framework .script import CScript , CScriptOp # noqa: E402
2525
@@ -102,7 +102,8 @@ def generate_psbt(tmpl, reward_spk, *, blocktime=None, poolid=None):
102102 scriptSig = CScript (b"" + scriptSig + CScriptOp .encode_op_pushdata (poolid ))
103103
104104 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 )]
106107 cbtx .vout = [CTxOut (tmpl ["coinbasevalue" ], reward_spk )]
107108 cbtx .vin [0 ].nSequence = 2 ** 32 - 2
108109 cbtx .rehash ()
0 commit comments