qa: Correctly clone txin sequence

Also clone the sequence number when cloning a tx in txn_clone.py

Backported from: 453803ad
Original author: MarcoFalke <falke.marco@gmail.com>
This commit is contained in:
Patrick Lodder 2021-12-17 15:07:29 -04:00
parent 7019ead6a1
commit a6ac45c135
No known key found for this signature in database
GPG Key ID: 7C523F5FBABE80E7

View File

@ -55,7 +55,7 @@ class TxnMallTest(BitcoinTestFramework):
# Construct a clone of tx1, to be malleated
rawtx1 = self.nodes[0].getrawtransaction(txid1,1)
clone_inputs = [{"txid":rawtx1["vin"][0]["txid"],"vout":rawtx1["vin"][0]["vout"]}]
clone_inputs = [{"txid":rawtx1["vin"][0]["txid"],"vout":rawtx1["vin"][0]["vout"], "sequence": rawtx1["vin"][0]["sequence"]}]
clone_outputs = {rawtx1["vout"][0]["scriptPubKey"]["addresses"][0]:rawtx1["vout"][0]["value"],
rawtx1["vout"][1]["scriptPubKey"]["addresses"][0]:rawtx1["vout"][1]["value"]}
clone_locktime = rawtx1["locktime"]