From 79e618268d29c0919561daa1d844ef2af01c9540 Mon Sep 17 00:00:00 2001 From: eugene Date: Thu, 6 Oct 2022 19:00:08 -0400 Subject: [PATCH 1/2] funding: ignore maxWaitNumBlocksFundingConf for zero conf channels This is so that if the funding transaction hasn't been confirmed in 2016 blocks, the channel isn't marked as closed by the responder. --- funding/manager.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/funding/manager.go b/funding/manager.go index 2bb3a07f5..74fcdfec8 100644 --- a/funding/manager.go +++ b/funding/manager.go @@ -2499,7 +2499,7 @@ func (f *Manager) waitForFundingWithTimeout( // If we are not the initiator, we have no money at stake and will // timeout waiting for the funding transaction to confirm after a // while. - if !ch.IsInitiator { + if !ch.IsInitiator && !ch.IsZeroConf() { f.wg.Add(1) go f.waitForTimeout(ch, cancelChan, timeoutChan) } @@ -3251,9 +3251,7 @@ func (f *Manager) waitForZeroConfChannel(c *channeldb.OpenChannel, // is already confirmed, the chainntnfs subsystem will return with the // confirmed tx. Otherwise, we'll wait here until confirmation occurs. confChan, err := f.waitForFundingWithTimeout(c) - if err == ErrConfirmationTimeout { - return f.fundingTimeout(c, pendingID) - } else if err != nil { + if err != nil { return fmt.Errorf("error waiting for zero-conf funding "+ "confirmation for ChannelPoint(%v): %v", c.FundingOutpoint, err) From 62eca941b1ce14d25aa46e5762a2139ae6cb770a Mon Sep 17 00:00:00 2001 From: eugene Date: Thu, 6 Oct 2022 19:03:44 -0400 Subject: [PATCH 2/2] release-notes: update for 0.15.2 --- docs/release-notes/release-notes-0.15.2.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/release-notes/release-notes-0.15.2.md b/docs/release-notes/release-notes-0.15.2.md index 11493623e..d8a99e8d2 100644 --- a/docs/release-notes/release-notes-0.15.2.md +++ b/docs/release-notes/release-notes-0.15.2.md @@ -8,6 +8,9 @@ ## Bug Fixes +* [A bug has been fixed where the responder of a zero-conf channel could forget + about the channel after a hard-coded 2016 blocks.](https://github.com/lightningnetwork/lnd/pull/6998) + * [A bug where LND wouldn't send a ChannelUpdate during a channel open has been fixed.](https://github.com/lightningnetwork/lnd/pull/6892)