lnwallet: Add missing opcode in senderHTLCScript.

As specified in BOLT 03.
This commit is contained in:
Jim Posen authored and Olaoluwa Osuntokun committed 2017-10-02 16:33:06 -07:00
1 parent 171c997fe0
commit 40ce817235
1 file changed
+4
+4
View File
@@ -260,6 +260,10 @@ func senderHTLCScript(senderKey, receiverKey, revocationKey *btcec.PublicKey,
builder.AddData(ripemd160H(paymentHash))
builder.AddOp(txscript.OP_EQUALVERIFY)
// This checks the receiver's signature so that a third party with
// knowledge of the payment preimage still cannot steal the output.
builder.AddOp(txscript.OP_CHECKSIG)
// Close out the OP_IF statement above.
builder.AddOp(txscript.OP_ENDIF)