graphdb: pass context to GraphSession

This commit is contained in:
Elle Mouton committed 2026-02-25 16:11:46 +02:00
1 parent 8722a96a4e
commit 0bb0d66952
9 files changed
+19 -16

No files matched your search

+3 -3
View File
@@ -253,14 +253,14 @@ func (c *ChannelGraph) FetchNodeFeatures(ctx context.Context,
// instance which can be used to perform queries against the channel graph. If
// the graph cache is not enabled, then the call-back will be provided with
// access to the graph via a consistent read-only transaction.
func (c *ChannelGraph) GraphSession(cb func(graph NodeTraverser) error,
reset func()) error {
func (c *ChannelGraph) GraphSession(ctx context.Context,
cb func(graph NodeTraverser) error, reset func()) error {
if c.graphCache != nil {
return cb(c)
}
return c.db.GraphSession(cb, reset)
return c.db.GraphSession(ctx, cb, reset)
}
// ForEachNodeCached iterates through all the stored vertices/nodes in the