summaryrefslogtreecommitdiff
path: root/bip-0174.mediawiki
diff options
context:
space:
mode:
authorLuke Dashjr <luke_github1@dashjr.org>2021-03-15 20:17:23 +0000
committerGitHub <noreply@github.com>2021-03-15 20:17:23 +0000
commitcd3885c0fb9d140b111ff729294400ff5dcfc8e3 (patch)
treeb0d82f42b68515be1492b83fb65189ffa4306e65 /bip-0174.mediawiki
parentd7cc27613e26a98d08ee420eea85fabc7698f169 (diff)
parent6db1e164861ba71617f132dc8bf8be1421aec8d8 (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.mediawiki8
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>