multi: update node announcement features in feature manager first

Move merge of our features into the feature manager, rather than
updating our node announcement then retrospectively setting the
feature manger's set to the new vector. This allows us to use the
feature vector as our single source of truth for announcements.
This commit is contained in:
Carla Kirk-Cohen committed 2023-05-04 10:35:46 -04:00
1 parent 019127c4f4
commit e41c65785f
6 files changed
+90 -40

No files matched your search

+1 -1
View File
@@ -178,7 +178,7 @@ func IPAnnouncer(annUpdater NodeAnnUpdater) func([]net.Addr,
map[string]struct{}) error {
return func(newAddrs []net.Addr, oldAddrs map[string]struct{}) error {
_, err := annUpdater(func(
_, err := annUpdater(nil, func(
currentNodeAnn *lnwire.NodeAnnouncement) {
// To ensure we don't duplicate any addresses, we'll
// filter out the same of addresses we should no longer