graph/db: thread context through FetchChannelEdgesByID

This commit is contained in:
Elle Mouton committed 2026-02-25 16:11:25 +02:00
1 parent acdef84d30
commit 6bbb9a32fc
14 files changed
+93 -42

No files matched your search

+6 -4
View File
@@ -739,12 +739,13 @@ func (c *ChannelGraph) FetchChannelEdgesByOutpoint(op *wire.OutPoint) (
}
// FetchChannelEdgesByID attempts to lookup directed edges by channel ID.
func (c *ChannelGraph) FetchChannelEdgesByID(chanID uint64) (
func (c *ChannelGraph) FetchChannelEdgesByID(ctx context.Context,
chanID uint64) (
*models.ChannelEdgeInfo, *models.ChannelEdgePolicy,
*models.ChannelEdgePolicy, error) {
return c.db.FetchChannelEdgesByID(
lnwire.GossipVersion1, chanID,
ctx, lnwire.GossipVersion1, chanID,
)
}
@@ -812,11 +813,12 @@ func (c *VersionedGraph) FetchNode(ctx context.Context,
}
// FetchChannelEdgesByID attempts to lookup directed edges by channel ID.
func (c *VersionedGraph) FetchChannelEdgesByID(chanID uint64) (
func (c *VersionedGraph) FetchChannelEdgesByID(ctx context.Context,
chanID uint64) (
*models.ChannelEdgeInfo, *models.ChannelEdgePolicy,
*models.ChannelEdgePolicy, error) {
return c.db.FetchChannelEdgesByID(c.v, chanID)
return c.db.FetchChannelEdgesByID(ctx, c.v, chanID)
}
// FetchChannelEdgesByOutpoint attempts to lookup directed edges by funding