channeldb+lnd: make channeldb backend configurable

This commit adds support for user configured channeldb backend.
This commit is contained in:
Andras Banki-Horvath committed 2020-05-22 11:26:25 +02:00
1 parent 9d57c1a6b4
commit 0e3629e2c7
3 files changed
+11 -6

No files matched your search

+1 -2
View File
@@ -377,8 +377,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr, chanDB *channeldb.DB,
// Initialize the sphinx router, placing it's persistent replay log in
// the same directory as the channel graph database.
graphDir := chanDB.Path()
sharedSecretPath := filepath.Join(graphDir, "sphinxreplay.db")
sharedSecretPath := filepath.Join(cfg.localDatabaseDir(), "sphinxreplay.db")
replayLog := htlcswitch.NewDecayedLog(sharedSecretPath, cc.chainNotifier)
sphinxRouter := sphinx.NewRouter(
nodeKeyECDH, activeNetParams.Params, replayLog,