diff options
author | Luke Dashjr <luke_github1@dashjr.org> | 2021-03-15 20:17:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-15 20:17:23 +0000 |
commit | cd3885c0fb9d140b111ff729294400ff5dcfc8e3 (patch) | |
tree | b0d82f42b68515be1492b83fb65189ffa4306e65 /bip-0174.mediawiki | |
parent | d7cc27613e26a98d08ee420eea85fabc7698f169 (diff) | |
parent | 6db1e164861ba71617f132dc8bf8be1421aec8d8 (diff) |
Merge pull request #1078 from dr-orlovsky/patch-5
Fixing Simple Signer Algorithm
Diffstat (limited to 'bip-0174.mediawiki')
-rw-r--r-- | bip-0174.mediawiki | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bip-0174.mediawiki b/bip-0174.mediawiki index b2cc300..75fea0e 100644 --- a/bip-0174.mediawiki +++ b/bip-0174.mediawiki @@ -637,9 +637,9 @@ for input,i in enumerate(psbt.inputs): assert(sha256d(non_witness_utxo) == psbt.tx.input[i].prevout.hash) if redeemScript.exists: assert(non_witness_utxo.vout[psbt.tx.input[i].prevout.n].scriptPubKey == P2SH(redeemScript)) - sign_non_witness(redeemScript) + sign_non_witness(redeemScript, i) else: - sign_non_witness(non_witness_utxo.vout[psbt.tx.input[i].prevout.n].scriptPubKey) + sign_non_witness(non_witness_utxo.vout[psbt.tx.input[i].prevout.n].scriptPubKey, i) else if witness_utxo.exists: if redeemScript.exists: assert(witness_utxo.scriptPubKey == P2SH(redeemScript)) @@ -647,10 +647,10 @@ for input,i in enumerate(psbt.inputs): else: script = witness_utxo.scriptPubKey if IsP2WPKH(script): - sign_witness(P2PKH(script[2:22])) + sign_witness(P2PKH(script[2:22]), i) else if IsP2WSH(script): assert(script == P2WSH(witnessScript)) - sign_witness(witnessScript) + sign_witness(witnessScript, i) else: assert False </pre> |