Skip to content

Commit 69b7d96

Browse files
Crypt-iQRoasbeef
authored andcommitted
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.
1 parent 004e2a1 commit 69b7d96

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

funding/manager.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,7 @@ func (f *Manager) waitForFundingWithTimeout(
24572457
// If we are not the initiator, we have no money at stake and will
24582458
// timeout waiting for the funding transaction to confirm after a
24592459
// while.
2460-
if !ch.IsInitiator {
2460+
if !ch.IsInitiator && !ch.IsZeroConf() {
24612461
f.wg.Add(1)
24622462
go f.waitForTimeout(ch, cancelChan, timeoutChan)
24632463
}
@@ -3200,9 +3200,7 @@ func (f *Manager) waitForZeroConfChannel(c *channeldb.OpenChannel,
32003200
// is already confirmed, the chainntnfs subsystem will return with the
32013201
// confirmed tx. Otherwise, we'll wait here until confirmation occurs.
32023202
confChan, err := f.waitForFundingWithTimeout(c)
3203-
if err == ErrConfirmationTimeout {
3204-
return f.fundingTimeout(c, pendingID)
3205-
} else if err != nil {
3203+
if err != nil {
32063204
return fmt.Errorf("error waiting for zero-conf funding "+
32073205
"confirmation for ChannelPoint(%v): %v",
32083206
c.FundingOutpoint, err)

0 commit comments

Comments
 (0)