graph/db: let ForEachNodeChannel take a context

This commit is contained in:
Elle Mouton committed 2025-07-08 15:10:30 +02:00
1 parent 67c0f54e13
commit f8d3a3f3ba
9 files changed
+22 -18

No files matched your search

+3 -1
View File
@@ -1278,7 +1278,9 @@ func (b *Builder) FetchLightningNode(ctx context.Context,
func (b *Builder) ForAllOutgoingChannels(cb func(*models.ChannelEdgeInfo,
*models.ChannelEdgePolicy) error) error {
return b.cfg.Graph.ForEachNodeChannel(b.cfg.SelfNode,
ctx := context.TODO()
return b.cfg.Graph.ForEachNodeChannel(ctx, b.cfg.SelfNode,
func(c *models.ChannelEdgeInfo, e *models.ChannelEdgePolicy,
_ *models.ChannelEdgePolicy) error {