mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 07:35:07 +02:00
htlcswitch+itest: catch link quit signal when processing hodlQueue
This commit makes sure when processing resolutions, e.g, settling invoices, when the link is already broken, the process would exit with an error. This fixes the issue we found in the itest, where an unexpected empty remote pending commitment was created although the remote peer is already offline.
This commit is contained in:
@@ -2155,6 +2155,20 @@ func (c *ChannelArbitrator) checkRemoteDanglingActions(
|
||||
continue
|
||||
}
|
||||
|
||||
preimageAvailable, err := c.isPreimageAvailable(htlc.RHash)
|
||||
if err != nil {
|
||||
log.Errorf("ChannelArbitrator(%v): failed to query "+
|
||||
"preimage for dangling htlc=%x from remote "+
|
||||
"commitments diff", c.cfg.ChanPoint,
|
||||
htlc.RHash[:])
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
if preimageAvailable {
|
||||
continue
|
||||
}
|
||||
|
||||
// Dust htlcs can be canceled back even before the commitment
|
||||
// transaction confirms. Dust htlcs are not enforceable onchain.
|
||||
// If another version of the commit tx would confirm we either
|
||||
|
Reference in New Issue
Block a user