multi: make decayed log DB remote compatible

Even though the sphinx router's persistent replay log is not crucial in
the operation of lnd as its state can be re-created by creating a new
brontide connection, we want to make lnd fully stateless and therefore
have the option of not storing any state on disk.
This commit is contained in:
Oliver Gugger committed 2021-08-04 14:55:53 +02:00
1 parent 6043113857
commit 1e27f491c7
6 files changed
+91 -56

No files matched your search

+2
View File
@@ -1616,6 +1616,7 @@ type databaseInstances struct {
chanStateDB *channeldb.DB
heightHintDB kvdb.Backend
macaroonDB kvdb.Backend
decayedLogDB kvdb.Backend
}
// initializeDatabases extracts the current databases that we'll use for normal
@@ -1649,6 +1650,7 @@ func initializeDatabases(ctx context.Context,
dbs := &databaseInstances{
heightHintDB: databaseBackends.HeightHintDB,
macaroonDB: databaseBackends.MacaroonDB,
decayedLogDB: databaseBackends.DecayedLogDB,
}
cleanUp := func() {
// We can just close the returned close functions directly. Even