multi: let chan and graph db implement AddrSource
Then use both to construct a multiAddrSource AddrSource and use that around the code-base.
This commit is contained in:
4 files changed
+55
-70
No files matched your search
@@ -607,12 +607,14 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
HtlcInterceptor: invoiceHtlcModifier,
|
||||
}
|
||||
|
||||
addrSource := channeldb.NewMultiAddrSource(dbs.ChanStateDB, dbs.GraphDB)
|
||||
|
||||
s := &server{
|
||||
cfg: cfg,
|
||||
implCfg: implCfg,
|
||||
graphDB: dbs.GraphDB.ChannelGraph(),
|
||||
chanStateDB: dbs.ChanStateDB.ChannelStateDB(),
|
||||
addrSource: dbs.ChanStateDB,
|
||||
addrSource: addrSource,
|
||||
miscDB: dbs.ChanStateDB,
|
||||
invoicesDB: dbs.InvoiceDB,
|
||||
cc: cc,
|
||||
@@ -1629,7 +1631,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
// static backup of the latest channel state.
|
||||
chanNotifier := &channelNotifier{
|
||||
chanNotifier: s.channelNotifier,
|
||||
addrs: dbs.ChanStateDB,
|
||||
addrs: s.addrSource,
|
||||
}
|
||||
backupFile := chanbackup.NewMultiFile(cfg.BackupFilePath)
|
||||
startingChans, err := chanbackup.FetchStaticChanBackups(
|
||||
|
||||
Reference in new issue
Block a user