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:
6 files changed
+91
-56
No files matched your search
@@ -383,12 +383,9 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
var serializedPubKey [33]byte
|
||||
copy(serializedPubKey[:], nodeKeyECDH.PubKey().SerializeCompressed())
|
||||
|
||||
// Initialize the sphinx router, placing it's persistent replay log in
|
||||
// the same directory as the channel graph database. We don't need to
|
||||
// replicate this data, so we'll store it locally.
|
||||
// Initialize the sphinx router.
|
||||
replayLog := htlcswitch.NewDecayedLog(
|
||||
cfg.graphDatabaseDir(), defaultSphinxDbName, cfg.DB.Bolt,
|
||||
cc.ChainNotifier,
|
||||
dbs.decayedLogDB, cc.ChainNotifier,
|
||||
)
|
||||
sphinxRouter := sphinx.NewRouter(
|
||||
nodeKeyECDH, cfg.ActiveNetParams.Params, replayLog,
|
||||
|
||||
Reference in new issue
Block a user