channeldb: add k/v implementation for InvoiceDB.DeleteCanceledInvoices method

This commit is contained in:
Andras Banki-Horvath committed 2023-10-18 16:15:58 +02:00
1 parent 1f8065de35
commit 8ab267ad90
4 files changed
+165

No files matched your search

+4
View File
@@ -95,6 +95,10 @@ type InvoiceDB interface {
// deserialze them.
DeleteInvoice(ctx context.Context,
invoicesToDelete []InvoiceDeleteRef) error
// DeleteCanceledInvoices removes all canceled invoices from the
// database.
DeleteCanceledInvoices(ctx context.Context) error
}
// Payload abstracts access to any additional fields provided in the final hop's
+6
View File
@@ -85,3 +85,9 @@ func (m *MockInvoiceDB) DeleteInvoice(invoices []InvoiceDeleteRef) error {
return args.Error(0)
}
func (m *MockInvoiceDB) DeleteCanceledInvoices(ctx context.Context) error {
args := m.Called(ctx)
return args.Error(0)
}