mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 18:10:48 +02:00
multi: extract address source into interface
As a preparation to have the method for querying the addresses of a node separate from the channel state, we extract that method out into its own interface.
This commit is contained in:
@ -224,6 +224,8 @@ type server struct {
|
||||
|
||||
chanStateDB *channeldb.DB
|
||||
|
||||
addrSource chanbackup.AddressSource
|
||||
|
||||
htlcSwitch *htlcswitch.Switch
|
||||
|
||||
interceptableSwitch *htlcswitch.InterceptableSwitch
|
||||
@ -433,6 +435,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
cfg: cfg,
|
||||
graphDB: dbs.graphDB.ChannelGraph(),
|
||||
chanStateDB: dbs.chanStateDB,
|
||||
addrSource: dbs.chanStateDB,
|
||||
cc: cc,
|
||||
sigPool: lnwallet.NewSigPool(cfg.Workers.Sig, cc.Signer),
|
||||
writePool: writePool,
|
||||
@ -1246,7 +1249,9 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
addrs: s.chanStateDB,
|
||||
}
|
||||
backupFile := chanbackup.NewMultiFile(cfg.BackupFilePath)
|
||||
startingChans, err := chanbackup.FetchStaticChanBackups(s.chanStateDB)
|
||||
startingChans, err := chanbackup.FetchStaticChanBackups(
|
||||
s.chanStateDB, s.addrSource,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user