invoices: if there are no invoices make gc noop

This commit is contained in:
djkazic
2024-04-30 11:40:44 -04:00
parent e8a1d4876e
commit 1542424782
2 changed files with 6 additions and 3 deletions

View File

@@ -2139,14 +2139,14 @@ func (d *DB) DeleteCanceledInvoices(_ context.Context) error {
invoiceIndexBucket,
)
if invoiceIndex == nil {
return invpkg.ErrNoInvoicesCreated
return nil
}
invoiceAddIndex := invoices.NestedReadWriteBucket(
addIndexBucket,
)
if invoiceAddIndex == nil {
return invpkg.ErrNoInvoicesCreated
return nil
}
payAddrIndex := tx.ReadWriteBucket(payAddrIndexBucket)