multi: introduce interface for payment database

This commit is contained in:
ziggie
2025-08-12 18:14:09 +02:00
parent 9a4968656a
commit 9f824fe1ee
5 changed files with 103 additions and 14 deletions

View File

@@ -925,9 +925,9 @@ type DatabaseInstances struct {
// InvoiceDB is the database that stores information about invoices.
InvoiceDB invoices.InvoiceDB
// KVPaymentsDB is the database that stores all payment related
// PaymentsDB is the database that stores all payment related
// information.
KVPaymentsDB *paymentsdb.KVPaymentsDB
PaymentsDB paymentsdb.DB
// MacaroonDB is the database that stores macaroon root keys.
MacaroonDB kvdb.Backend
@@ -1237,7 +1237,7 @@ func (d *DefaultDatabaseBuilder) BuildDatabase(
return nil, nil, err
}
dbs.KVPaymentsDB = kvPaymentsDB
dbs.PaymentsDB = kvPaymentsDB
// Wrap the watchtower client DB and make sure we clean up.
if cfg.WtClient.Active {