graph/db: thread context through ForEachNodeDirectedChannel

This commit is contained in:
Elle Mouton committed 2026-02-25 15:33:34 +02:00
1 parent 2f0d2962dd
commit 6ccf93c2c9
10 files changed
+36 -31

No files matched your search

+3 -1
View File
@@ -1,6 +1,7 @@
package routing
import (
"context"
"fmt"
"github.com/lightningnetwork/lnd/fn/v2"
@@ -64,7 +65,8 @@ func newBandwidthManager(graph Graph, sourceNode route.Vertex,
// First, we'll collect the set of outbound edges from the target
// source node and add them to our bandwidth manager's map of channels.
err := graph.ForEachNodeDirectedChannel(
sourceNode, func(channel *graphdb.DirectedChannel) error {
context.TODO(), sourceNode,
func(channel *graphdb.DirectedChannel) error {
shortID := lnwire.NewShortChanIDFromInt(
channel.ChannelID,
)