From 24ca962f75a96cec2a72799e85680d73840c0c76 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Fri, 26 Jul 2019 18:06:40 -0700 Subject: [PATCH] htlcswitch: lower max outgoing cltv expiry to one week worth of blocks The current value was based on the previous default CLTV delta of 144 blocks. This has been lowered to 40 since lnd v0.6.0-beta, making the current value of 5000 blocks a bit high. Lowering it to one week should be more than enough to account for the other major lightning implementations. Eclair currently has a default CLTV delta of 144, while c-lightning's is 14. --- htlcswitch/link.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htlcswitch/link.go b/htlcswitch/link.go index 251ad2bd..98e717f3 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -37,9 +37,11 @@ const ( // willing to lock its own funds too, could force the funds of this node // to be locked up for an indefinite (max int32) number of blocks. // - // The value 5000 is based on the maximum number of hops (20), the - // default cltv delta (144) and some extra margin. - DefaultMaxOutgoingCltvExpiry = 5000 + // The value 1008 corresponds to on average one week worth of blocks and + // is based on the maximum number of hops (20), the default cltv delta + // (40) and some extra margin to account for the other lightning + // implementations. + DefaultMaxOutgoingCltvExpiry = 1008 // DefaultMinLinkFeeUpdateTimeout represents the minimum interval in // which a link should propose to update its commitment fee rate.