graphdb: pass context to FilterKnownChanIDs

This commit is contained in:
Elle Mouton committed 2026-02-25 16:11:46 +02:00
1 parent 46d37a691f
commit 072244ee18
6 files changed
+21 -16

No files matched your search

+4 -3
View File
@@ -514,10 +514,11 @@ func (c *ChannelGraph) PruneGraphNodes() error {
// words, we perform a set difference of our set of chan ID's and the ones
// passed in. This method can be used by callers to determine the set of
// channels another peer knows of that we don't.
func (c *ChannelGraph) FilterKnownChanIDs(chansInfo []ChannelUpdateInfo,
func (c *ChannelGraph) FilterKnownChanIDs(ctx context.Context,
chansInfo []ChannelUpdateInfo,
isZombieChan func(time.Time, time.Time) bool) ([]uint64, error) {
unknown, knownZombies, err := c.db.FilterKnownChanIDs(chansInfo)
unknown, knownZombies, err := c.db.FilterKnownChanIDs(ctx, chansInfo)
if err != nil {
return nil, err
}
@@ -547,7 +548,7 @@ func (c *ChannelGraph) FilterKnownChanIDs(chansInfo []ChannelUpdateInfo,
// alive, and we let it be added to the set of IDs to query our
// peer for.
err := c.db.MarkEdgeLive(
context.TODO(), info.ShortChannelID.ToUint64(),
ctx, info.ShortChannelID.ToUint64(),
)
// Since there is a chance that the edge could have been marked
// as "live" between the FilterKnownChanIDs call and the