From d96cf0ec64cb9a2331b895b804cc4b3e0110dbb3 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 19 Jan 2016 00:19:16 -0800 Subject: [PATCH] lnwallet: fix receiver htlc script * Fixes a bug in script_utils.go. CSV instead of CLTV was being used within the timeout clause of the receivers HTLC (sender can reclaim the HTLC). --- lnwallet/script_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnwallet/script_utils.go b/lnwallet/script_utils.go index 9c0de55c..a854767e 100644 --- a/lnwallet/script_utils.go +++ b/lnwallet/script_utils.go @@ -192,7 +192,7 @@ func receiverHTLCScript(absoluteTimeout, relativeTimeout uint32, senderKey, // indefinately. builder.AddOp(txscript.OP_NOTIF) builder.AddInt64(int64(absoluteTimeout)) - builder.AddOp(OP_CHECKSEQUENCEVERIFY) + builder.AddOp(txscript.OP_CHECKLOCKTIMEVERIFY) builder.AddOp(txscript.OP_DROP) builder.AddOp(txscript.OP_ENDIF)