Merge pull request #5913 from bhandras/invoices_5911

invoices: do not log when invoice is already deleted
This commit is contained in:
Olaoluwa Osuntokun 2021-11-01 15:31:53 -07:00 committed by GitHub
commit 40ea494d2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -584,6 +584,9 @@ messages directly. There is no routing/path finding involved.
re-notified](https://github.com/lightningnetwork/lnd/pull/5901), which could
lead to higher-level HTLC mismanagement issues.
* [Do not error log when an invoice that has been canceled and GC'd is expired](
https://github.com/lightningnetwork/lnd/pull/5913)
## Documentation
The [code contribution guidelines have been updated to mention the new

View File

@ -353,6 +353,11 @@ func (ew *InvoiceExpiryWatcher) expireInvoice(hash lntypes.Hash, force bool) {
case channeldb.ErrInvoiceAlreadySettled:
case channeldb.ErrInvoiceNotFound:
// It's possible that the user has manually canceled the invoice
// which will then be deleted by the garbage collector resulting
// in an ErrInvoiceNotFound error.
default:
log.Errorf("Unable to cancel invoice: %v: %v", hash, err)
}