graph: remove one context.TODO

By threading a context through to the Builder's ForAllOutgoingChannels
method.
This commit is contained in:
Elle Mouton
2025-07-08 11:55:14 +02:00
parent 3d5e852c8c
commit 793c1057bb
4 changed files with 11 additions and 10 deletions

View File

@@ -1709,7 +1709,7 @@ func (d *AuthenticatedGossiper) retransmitStaleAnns(ctx context.Context,
havePublicChannels bool
edgesToUpdate []updateTuple
)
err := d.cfg.Graph.ForAllOutgoingChannels(func(
err := d.cfg.Graph.ForAllOutgoingChannels(ctx, func(
info *models.ChannelEdgeInfo,
edge *models.ChannelEdgePolicy) error {

View File

@@ -211,8 +211,9 @@ func (r *mockGraphSource) ForEachNode(
return nil
}
func (r *mockGraphSource) ForAllOutgoingChannels(cb func(
i *models.ChannelEdgeInfo, c *models.ChannelEdgePolicy) error) error {
func (r *mockGraphSource) ForAllOutgoingChannels(_ context.Context,
cb func(i *models.ChannelEdgeInfo,
c *models.ChannelEdgePolicy) error) error {
r.mu.Lock()
defer r.mu.Unlock()
@@ -3716,7 +3717,7 @@ out:
// policy of all of them.
const newTimeLockDelta = 100
var edgesToUpdate []EdgeWithInfo
err = ctx.router.ForAllOutgoingChannels(func(
err = ctx.router.ForAllOutgoingChannels(context.Background(), func(
info *models.ChannelEdgeInfo,
edge *models.ChannelEdgePolicy) error {