lnwallet: Add missing opcode in senderHTLCScript.

As specified in BOLT 03.
This commit is contained in:
Jim Posen 2017-09-25 13:28:30 -07:00 committed by Olaoluwa Osuntokun
parent 171c997fe0
commit 40ce817235

@ -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)