mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 10:09:08 +02:00
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:
@ -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