mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
wallet/signing: stream signatures for segwit inputs
This commit is contained in:
parent
5a6b2a5a97
commit
f56d39a447
@ -231,13 +231,12 @@ async def sign_tx(tx: SignTx, root):
|
||||
bip143_hash = bip143.preimage_hash(tx, txi, ecdsa_hash_pubkey(key_sign_pub))
|
||||
|
||||
signature = ecdsa_sign(key_sign, bip143_hash)
|
||||
|
||||
witness = get_p2wpkh_witness(signature, key_sign_pub)
|
||||
|
||||
tx_ser.signature_index = i
|
||||
tx_ser.signature = signature
|
||||
tx_ser.serialized_tx = witness
|
||||
tx_req.serialized = tx_ser
|
||||
# else
|
||||
# witness is 0x00
|
||||
|
||||
write_uint32(tx_ser.serialized_tx, tx.lock_time)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user