diff --git a/test/functional/mempool_reorg.py b/test/functional/mempool_reorg.py --- a/test/functional/mempool_reorg.py +++ b/test/functional/mempool_reorg.py @@ -56,11 +56,13 @@ # Create a transaction which is time-locked to two blocks in the future timelock_tx = self.nodes[0].createrawtransaction( - [{"txid": coinbase_txids[0], "vout": 0}], {node0_address: 49.99}) - # Set the time lock - timelock_tx = timelock_tx.replace("ffffffff", "11111191", 1) - timelock_tx = timelock_tx[:-8] + \ - hex(self.nodes[0].getblockcount() + 2)[2:] + "000000" + inputs=[{ + "txid": coinbase_txids[0], + "vout": 0 + }], + outputs={node0_address: 49.99}, + locktime=self.nodes[0].getblockcount() + 2, + ) timelock_tx = self.nodes[0].signrawtransactionwithwallet(timelock_tx)[ "hex"] # This will raise an exception because the timelock transaction is too