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
@@ -716,7 +716,9 @@ func (r *rpcServer) addDeps(ctx context.Context, s *server,
FetchChannelCapacity: func(chanID uint64) (btcutil.Amount,
error) {
info, _, _, err := graph.FetchChannelEdgesByID(chanID)
info, _, _, err := graph.FetchChannelEdgesByID(
ctx, chanID,
)
if err != nil {
return 0, err
}
@@ -734,7 +736,7 @@ func (r *rpcServer) addDeps(ctx context.Context, s *server,
route.Vertex, error) {
info, _, _, err := graph.FetchChannelEdgesByID(
chanID,
ctx, chanID,
)
if err != nil {
return route.Vertex{}, route.Vertex{},
@@ -7106,7 +7108,7 @@ func (r *rpcServer) GetNodeMetrics(ctx context.Context,
// uniquely identify the location of transaction's funding output within the
// blockchain. The former is an 8-byte integer, while the latter is a string
// formatted as funding_txid:output_index.
func (r *rpcServer) GetChanInfo(_ context.Context,
func (r *rpcServer) GetChanInfo(ctx context.Context,
in *lnrpc.ChanInfoRequest) (*lnrpc.ChannelEdge, error) {
graph := r.server.graphDB
@@ -7120,7 +7122,7 @@ func (r *rpcServer) GetChanInfo(_ context.Context,
switch {
case in.ChanId != 0:
edgeInfo, edge1, edge2, err = graph.FetchChannelEdgesByID(
in.ChanId,
ctx, in.ChanId,
)
case in.ChanPoint != "":