lnwallet: Add missing opcode in senderHTLCScript.
As specified in BOLT 03.
This commit is contained in:
parent
171c997fe0
commit
40ce817235
@ -260,6 +260,10 @@ func senderHTLCScript(senderKey, receiverKey, revocationKey *btcec.PublicKey,
|
|||||||
builder.AddData(ripemd160H(paymentHash))
|
builder.AddData(ripemd160H(paymentHash))
|
||||||
builder.AddOp(txscript.OP_EQUALVERIFY)
|
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.
|
// Close out the OP_IF statement above.
|
||||||
builder.AddOp(txscript.OP_ENDIF)
|
builder.AddOp(txscript.OP_ENDIF)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user