multi: let ForEachNodeChannel take a reset param

This commit is contained in:
Elle Mouton
2025-07-11 10:31:29 +02:00
parent 16126d7703
commit e5fbca8299
13 changed files with 57 additions and 43 deletions

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,