multi: thread context through Fail payment functions

This commit is contained in:
ziggie committed 2026-02-25 08:02:24 +01:00
1 parent 446300984e
commit 635a67c94a
10 files changed
+41 -23

No files matched your search

+1 -3
View File
@@ -1782,11 +1782,9 @@ func (s *SQLStore) FailAttempt(ctx context.Context, paymentHash lntypes.Hash,
// This method is part of the PaymentControl interface, which is embedded in
// the PaymentWriter interface and ultimately the DB interface. It represents
// step 4 in the payment lifecycle control flow.
func (s *SQLStore) Fail(paymentHash lntypes.Hash,
func (s *SQLStore) Fail(ctx context.Context, paymentHash lntypes.Hash,
reason FailureReason) (*MPPayment, error) {
ctx := context.TODO()
var mpPayment *MPPayment
err := s.db.ExecTx(ctx, sqldb.WriteTxOpt(), func(db SQLQueries) error {