mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
fix: offline signing
This commit is contained in:
parent
4f3497027d
commit
cf38e1e47c
1 changed files with 7 additions and 4 deletions
|
@ -432,9 +432,11 @@ class Transaction:
|
||||||
pubkeys = txin['pubkeys']
|
pubkeys = txin['pubkeys']
|
||||||
if not txin.get('redeemScript'):
|
if not txin.get('redeemScript'):
|
||||||
pubkey = pubkeys[0]
|
pubkey = pubkeys[0]
|
||||||
|
script = ''
|
||||||
|
if signatures:
|
||||||
sig = signatures[0]
|
sig = signatures[0]
|
||||||
sig = sig + '01' # hashtype
|
sig = sig + '01' # hashtype
|
||||||
script = op_push(len(sig)/2)
|
script += op_push(len(sig)/2)
|
||||||
script += sig
|
script += sig
|
||||||
script += op_push(len(pubkey)/2)
|
script += op_push(len(pubkey)/2)
|
||||||
script += pubkey
|
script += pubkey
|
||||||
|
@ -720,6 +722,7 @@ class Transaction:
|
||||||
for i, txin in enumerate(self.inputs):
|
for i, txin in enumerate(self.inputs):
|
||||||
item = input_info[i]
|
item = input_info[i]
|
||||||
txin['address'] = item['address']
|
txin['address'] = item['address']
|
||||||
|
txin['signatures'] = item['signatures']
|
||||||
txin['scriptPubKey'] = item['scriptPubKey']
|
txin['scriptPubKey'] = item['scriptPubKey']
|
||||||
txin['redeemScript'] = item.get('redeemScript')
|
txin['redeemScript'] = item.get('redeemScript')
|
||||||
txin['redeemPubkey'] = item.get('redeemPubkey')
|
txin['redeemPubkey'] = item.get('redeemPubkey')
|
||||||
|
|
Loading…
Add table
Reference in a new issue