graph/db: thread context through to HighestChanID

This commit is contained in:
Elle Mouton committed 2025-06-19 14:49:32 +02:00
1 parent 004440a86c
commit 9597f01ce3
7 files changed
+21 -14

No files matched your search

+1 -3
View File
@@ -543,9 +543,7 @@ func (s *SQLStore) AddChannelEdge(ctx context.Context,
// can be used by peers to quickly determine if their graphs are in sync.
//
// NOTE: This is part of the V1Store interface.
func (s *SQLStore) HighestChanID() (uint64, error) {
ctx := context.TODO()
func (s *SQLStore) HighestChanID(ctx context.Context) (uint64, error) {
var highestChanID uint64
err := s.db.ExecTx(ctx, sqldb.ReadTxOpt(), func(db SQLQueries) error {
chanID, err := db.HighestSCID(ctx, int16(ProtocolV1))