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.
This commit is contained in:
Wilmer Paulino 2019-07-26 18:06:40 -07:00
parent 87ff463abd
commit 24ca962f75
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F

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