multi: refresh htlcswitch aliases on aliasmgr update

This commit is contained in:
George Tsagkarelis
2024-03-12 18:15:14 +01:00
committed by Oliver Gugger
parent e31cdc4db3
commit ea92d0aecc
8 changed files with 152 additions and 20 deletions

View File

@@ -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
}