From da6cc4a6e58ecebb3c37f6d3eecc1d813771638b Mon Sep 17 00:00:00 2001 From: Tomas Susanka Date: Tue, 13 Feb 2018 12:50:13 +0100 Subject: [PATCH] signing/multisig: typo --- src/apps/wallet/sign_tx/scripts.py | 1 + src/apps/wallet/sign_tx/signing.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/wallet/sign_tx/scripts.py b/src/apps/wallet/sign_tx/scripts.py index 310435b373..7a4bb03cc7 100644 --- a/src/apps/wallet/sign_tx/scripts.py +++ b/src/apps/wallet/sign_tx/scripts.py @@ -137,6 +137,7 @@ def get_p2wpkh_witness(signature: bytes, pubkey: bytes, sighash: int): return w +# p2wsh is a generic mechanism but is currently used for multisig only def get_p2wsh_witness(multisig: MultisigRedeemScriptType, signature: bytes, signature_index: int, sighash: int): signatures = multisig.signatures # other signatures diff --git a/src/apps/wallet/sign_tx/signing.py b/src/apps/wallet/sign_tx/signing.py index 8e27855aed..739c749ba6 100644 --- a/src/apps/wallet/sign_tx/signing.py +++ b/src/apps/wallet/sign_tx/signing.py @@ -347,7 +347,7 @@ async def sign_tx(tx: SignTx, root): signature = ecdsa_sign(key_sign, bip143_hash) if txi.multisig: - # place of our signature based on the pubkey + # find out place of our signature based on the pubkey signature_index = multisig_pubkey_index(txi_sign.multisig, key_sign_pub) witness = get_p2wsh_witness(txi.multisig, signature, signature_index, get_hash_type(coin)) else: