File tree 2 files changed +18
-0
lines changed 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -924,6 +924,10 @@ type DatabaseInstances struct {
924
924
// InvoiceDB is the database that stores information about invoices.
925
925
InvoiceDB invoices.InvoiceDB
926
926
927
+ // KVPaymentsDB is the database that stores all payment related
928
+ // information.
929
+ KVPaymentsDB * channeldb.KVPaymentsDB
930
+
927
931
// MacaroonDB is the database that stores macaroon root keys.
928
932
MacaroonDB kvdb.Backend
929
933
@@ -1184,6 +1188,14 @@ func (d *DefaultDatabaseBuilder) BuildDatabase(
1184
1188
dbs .InvoiceDB = dbs .ChanStateDB
1185
1189
}
1186
1190
1191
+ // Mount the payments DB which is only KV for now.
1192
+ //
1193
+ // TODO(ziggie): Add support for SQL payments DB.
1194
+ kvPaymentsDB := channeldb .NewKVPaymentsDB (
1195
+ dbs .ChanStateDB ,
1196
+ )
1197
+ dbs .KVPaymentsDB = kvPaymentsDB
1198
+
1187
1199
// Wrap the watchtower client DB and make sure we clean up.
1188
1200
if cfg .WtClient .Active {
1189
1201
dbs .TowerClientDB , err = wtdb .OpenClientDB (
Original file line number Diff line number Diff line change @@ -317,6 +317,12 @@ type server struct {
317
317
318
318
invoicesDB invoices.InvoiceDB
319
319
320
+ // kvPaymentsDB is the DB that contains all functions for managing
321
+ // payments.
322
+ //
323
+ // TODO(ziggie): Replace with interface.
324
+ kvPaymentsDB * channeldb.KVPaymentsDB
325
+
320
326
aliasMgr * aliasmgr.Manager
321
327
322
328
htlcSwitch * htlcswitch.Switch
You can’t perform that action at this time.
0 commit comments