graphdb: pass context to HasV1ChannelEdge

This commit is contained in:
Elle Mouton committed 2026-02-25 16:11:29 +02:00
1 parent 1d4c6aadb4
commit 87ed09a829
5 files changed
+15 -13

No files matched your search

+4 -2
View File
@@ -1151,7 +1151,7 @@ func (b *Builder) updateEdge(ctx context.Context,
defer b.channelEdgeMtx.Unlock(policy.ChannelID)
edge1Timestamp, edge2Timestamp, exists, isZombie, err :=
b.cfg.Graph.HasV1ChannelEdge(policy.ChannelID)
b.cfg.Graph.HasV1ChannelEdge(ctx, policy.ChannelID)
if err != nil && !errors.Is(err, graphdb.ErrGraphNoEdgesFound) {
return fmt.Errorf("unable to check for edge existence: %w", err)
}
@@ -1366,7 +1366,9 @@ func (b *Builder) IsStaleEdgePolicy(chanID lnwire.ShortChannelID,
timestamp time.Time, flags lnwire.ChanUpdateChanFlags) bool {
edge1Timestamp, edge2Timestamp, exists, isZombie, err :=
b.cfg.Graph.HasV1ChannelEdge(chanID.ToUint64())
b.cfg.Graph.HasV1ChannelEdge(
context.TODO(), chanID.ToUint64(),
)
if err != nil {
log.Debugf("Check stale edge policy got error: %v", err)
return false