multi: let ForEachNodeChannel take a reset param

This commit is contained in:
Elle Mouton committed 2025-07-15 11:23:27 +02:00
1 parent 16126d7703
commit e5fbca8299
13 files changed
+57 -43

No files matched your search

+3 -2
View File
@@ -1254,7 +1254,8 @@ func newServer(ctx context.Context, cfg *Config, listenAddrs []net.Addr,
DefaultRoutingPolicy: cc.RoutingPolicy,
ForAllOutgoingChannels: func(ctx context.Context,
cb func(*models.ChannelEdgeInfo,
*models.ChannelEdgePolicy) error) error {
*models.ChannelEdgePolicy) error,
reset func()) error {
return s.graphDB.ForEachNodeChannel(ctx, selfVertex,
func(c *models.ChannelEdgeInfo,
@@ -1264,7 +1265,7 @@ func newServer(ctx context.Context, cfg *Config, listenAddrs []net.Addr,
// NOTE: The invoked callback here may
// receive a nil channel policy.
return cb(c, e)
},
}, reset,
)
},
PropagateChanPolicyUpdate: s.authGossiper.PropagateChanPolicyUpdate,