graph/db: thread context through to HighestChanID

This commit is contained in:
Elle Mouton
2025-06-18 08:21:06 +02:00
parent 004440a86c
commit 9597f01ce3
7 changed files with 21 additions and 14 deletions

View File

@@ -965,12 +965,14 @@ func (g *GossipSyncer) processChanRangeReply(_ context.Context,
// party when we're kicking off the channel graph synchronization upon
// connection. The historicalQuery boolean can be used to generate a query from
// the genesis block of the chain.
func (g *GossipSyncer) genChanRangeQuery(_ context.Context,
func (g *GossipSyncer) genChanRangeQuery(ctx context.Context,
historicalQuery bool) (*lnwire.QueryChannelRange, error) {
// First, we'll query our channel graph time series for its highest
// known channel ID.
newestChan, err := g.cfg.channelSeries.HighestChanID(g.cfg.chainHash)
newestChan, err := g.cfg.channelSeries.HighestChanID(
ctx, g.cfg.chainHash,
)
if err != nil {
return nil, err
}