lnwallet: remove the isClosed check for coop close

With the new RBF based close, we'll actually close the same channel multiple times, so this check isn't required any longer.
This commit is contained in:
Olaoluwa Osuntokun 2024-03-07 20:11:01 -08:00
parent abf2249203
commit 37e00e9563

View File

@ -7363,12 +7363,6 @@ func (lc *LightningChannel) CreateCloseProposal(proposedFee btcutil.Amount,
lc.Lock()
defer lc.Unlock()
// If we're already closing the channel, then ignore this request.
if lc.isClosed {
// TODO(roasbeef): check to ensure no pending payments
return nil, nil, 0, ErrChanClosing
}
opts := defaultCloseOpts()
for _, optFunc := range closeOpts {
optFunc(opts)
@ -7453,12 +7447,6 @@ func (lc *LightningChannel) CompleteCooperativeClose(
lc.Lock()
defer lc.Unlock()
// If the channel is already closing, then ignore this request.
if lc.isClosed {
// TODO(roasbeef): check to ensure no pending payments
return nil, 0, ErrChanClosing
}
opts := defaultCloseOpts()
for _, optFunc := range closeOpts {
optFunc(opts)