From 39f9673bc7ad651af4db663efbff29e23be7b3d0 Mon Sep 17 00:00:00 2001 From: ziggie Date: Wed, 21 Jun 2023 11:47:16 +0200 Subject: [PATCH 1/2] lnd: update defaultMaxLocalCSVDelay Make sure our default local csv delay maximum is symetric compared to the remote default csv maximum. --- config.go | 7 ++++--- funding/manager_test.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config.go b/config.go index 50a6fffa4..706fb7892 100644 --- a/config.go +++ b/config.go @@ -175,9 +175,10 @@ const ( defaultRemoteMaxHtlcs = 483 // defaultMaxLocalCSVDelay is the maximum delay we accept on our - // commitment output. - // TODO(halseth): find a more scientific choice of value. - defaultMaxLocalCSVDelay = 10000 + // commitment output. The local csv delay maximum is now equal to + // the remote csv delay maximum we require for the remote commitment + // transaction. + defaultMaxLocalCSVDelay = 2016 // defaultChannelCommitInterval is the default maximum time between // receiving a channel state update and signing a new commitment. diff --git a/funding/manager_test.go b/funding/manager_test.go index 81c84bc57..1ca66904b 100644 --- a/funding/manager_test.go +++ b/funding/manager_test.go @@ -59,7 +59,7 @@ const ( // defaultMaxLocalCSVDelay is the maximum delay we accept on our // commitment output. - defaultMaxLocalCSVDelay = 10000 + defaultMaxLocalCSVDelay = 2016 ) var ( From 6cbb62a2df7c22d3ecaa5e7d177e86c8796f269d Mon Sep 17 00:00:00 2001 From: ziggie Date: Wed, 21 Jun 2023 11:49:59 +0200 Subject: [PATCH 2/2] docs: update release-notes --- docs/release-notes/release-notes-0.17.0.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/release-notes/release-notes-0.17.0.md b/docs/release-notes/release-notes-0.17.0.md index 9569b2707..911c226d4 100644 --- a/docs/release-notes/release-notes-0.17.0.md +++ b/docs/release-notes/release-notes-0.17.0.md @@ -39,6 +39,10 @@ package](https://github.com/lightningnetwork/lnd/pull/7356) * [HTLC serialization updated](https://github.com/lightningnetwork/lnd/pull/7710) to allow storing extra data transmitted in TLVs. +* [MaxLocalCSVDelay now has a default value of 2016. It is still possible to +override this value with the config option --maxlocaldelay for those who rely +on the old value of 10000](https://github.com/lightningnetwork/lnd/pull/7780). + ## RPC * [SendOutputs](https://github.com/lightningnetwork/lnd/pull/7631) now adheres