routing+server: let ForAllOutgoingChannels take a context

And so, remove a previously added context.TODO
This commit is contained in:
Elle Mouton
2025-07-07 09:35:03 +02:00
parent 046e106a17
commit 85fda8b926
3 changed files with 10 additions and 9 deletions

View File

@@ -1252,10 +1252,9 @@ func newServer(ctx context.Context, cfg *Config, listenAddrs []net.Addr,
s.localChanMgr = &localchans.Manager{
SelfPub: nodeKeyDesc.PubKey,
DefaultRoutingPolicy: cc.RoutingPolicy,
ForAllOutgoingChannels: func(cb func(*models.ChannelEdgeInfo,
*models.ChannelEdgePolicy) error) error {
ctx := context.TODO()
ForAllOutgoingChannels: func(ctx context.Context,
cb func(*models.ChannelEdgeInfo,
*models.ChannelEdgePolicy) error) error {
return s.graphDB.ForEachNodeChannel(ctx, selfVertex,
func(c *models.ChannelEdgeInfo,