test: Make the scriptPubKey of MiniWallet created txs mutable

This makes individual bytes of the scriptPubKey mutable, previously it
could only be re-assigned as a whole.
This commit is contained in:
MacroFake 2022-07-01 12:28:33 +02:00
parent fa29245827
commit fa5059b7df
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -294,7 +294,7 @@ class MiniWallet:
tx = CTransaction() tx = CTransaction()
tx.vin = [CTxIn(COutPoint(int(utxo_to_spend['txid'], 16), utxo_to_spend['vout']), nSequence=sequence)] tx.vin = [CTxIn(COutPoint(int(utxo_to_spend['txid'], 16), utxo_to_spend['vout']), nSequence=sequence)]
tx.vout = [CTxOut(int(COIN * send_value), self._scriptPubKey)] tx.vout = [CTxOut(int(COIN * send_value), bytearray(self._scriptPubKey))]
tx.nLockTime = locktime tx.nLockTime = locktime
if self._mode == MiniWalletMode.RAW_P2PK: if self._mode == MiniWalletMode.RAW_P2PK:
self.sign_tx(tx) self.sign_tx(tx)