graph/db: thread context through ChanUpdatesInHorizon

This commit is contained in:
Elle Mouton committed 2026-02-25 15:33:34 +02:00
1 parent 6ccf93c2c9
commit dc9dae8dd6
8 files changed
+19 -13

No files matched your search

+2 -2
View File
@@ -1170,7 +1170,8 @@ func (s *SQLStore) updateChanCacheBatch(v lnwire.GossipVersion,
// 6. Repeat with updated pagination cursor until no more results
//
// NOTE: This is part of the Store interface.
func (s *SQLStore) ChanUpdatesInHorizon(startTime, endTime time.Time,
func (s *SQLStore) ChanUpdatesInHorizon(ctx context.Context,
startTime, endTime time.Time,
opts ...IteratorOption) iter.Seq2[ChannelEdge, error] {
// Apply options.
@@ -1181,7 +1182,6 @@ func (s *SQLStore) ChanUpdatesInHorizon(startTime, endTime time.Time,
return func(yield func(ChannelEdge, error) bool) {
var (
ctx = context.TODO()
edgesSeen = make(map[uint64]struct{})
edgesToCache = make(map[uint64]ChannelEdge)
hits int