mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 10:11:11 +02:00
graph: remove one context.TODO
By threading a context through to the Builder's ForAllOutgoingChannels method.
This commit is contained in:
@@ -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 {
|
||||
|
||||
|
@@ -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 {
|
||||
|
||||
|
Reference in New Issue
Block a user