mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-08 03:41:42 +01:00
multi: refresh htlcswitch aliases on aliasmgr update
This commit is contained in:
committed by
Oliver Gugger
parent
e31cdc4db3
commit
ea92d0aecc
13
server.go
13
server.go
@@ -644,7 +644,18 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
thresholdSats := btcutil.Amount(cfg.MaxFeeExposure)
|
||||
thresholdMSats := lnwire.NewMSatFromSatoshis(thresholdSats)
|
||||
|
||||
s.aliasMgr, err = aliasmgr.NewManager(dbs.ChanStateDB)
|
||||
linkUpdater := func(shortID lnwire.ShortChannelID) error {
|
||||
link, err := s.htlcSwitch.GetLinkByShortID(shortID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s.htlcSwitch.UpdateLinkAliases(link)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
s.aliasMgr, err = aliasmgr.NewManager(dbs.ChanStateDB, linkUpdater)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user