mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
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:
parent
fa29245827
commit
fa5059b7df
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user