graph/db: thread context through to SourceNode

This commit is contained in:
Elle Mouton committed 2025-06-19 14:47:41 +02:00
1 parent 65049ddd02
commit 7ba4051cfd
12 files changed
+49 -32

No files matched your search

+2 -2
View File
@@ -394,8 +394,8 @@ func (s *SQLStore) LookupAlias(pub *btcec.PublicKey) (string, error) {
// node based off the source node.
//
// NOTE: part of the V1Store interface.
func (s *SQLStore) SourceNode() (*models.LightningNode, error) {
ctx := context.TODO()
func (s *SQLStore) SourceNode(ctx context.Context) (*models.LightningNode,
error) {
var node *models.LightningNode
err := s.db.ExecTx(ctx, sqldb.ReadTxOpt(), func(db SQLQueries) error {