graph/db: thread context through to FetchLightingNode

This commit is contained in:
Elle Mouton
2025-06-17 11:44:33 +02:00
parent d1cfb47428
commit 66c5a97202
12 changed files with 47 additions and 39 deletions

View File

@@ -84,7 +84,8 @@ type ChannelGraphSource interface {
// FetchLightningNode attempts to look up a target node by its identity
// public key. channeldb.ErrGraphNodeNotFound is returned if the node
// doesn't exist within the graph.
FetchLightningNode(route.Vertex) (*models.LightningNode, error)
FetchLightningNode(context.Context,
route.Vertex) (*models.LightningNode, error)
// MarkZombieEdge marks the channel with the given ID as a zombie edge.
MarkZombieEdge(chanID uint64) error
@@ -242,8 +243,8 @@ type DB interface {
// FetchLightningNode attempts to look up a target node by its identity
// public key. If the node isn't found in the database, then
// ErrGraphNodeNotFound is returned.
FetchLightningNode(nodePub route.Vertex) (*models.LightningNode,
error)
FetchLightningNode(ctx context.Context,
nodePub route.Vertex) (*models.LightningNode, error)
// ForEachNodeChannel iterates through all channels of the given node,
// executing the passed callback with an edge info structure and the