multi: thread context through DeletePayment

This commit is contained in:
ziggie committed 2026-02-25 08:02:19 +01:00
1 parent fcb8929ea5
commit bc15d4bb50
5 files changed
+32 -17

No files matched your search

+1 -3
View File
@@ -1206,11 +1206,9 @@ func computePaymentStatusFromDB(ctx context.Context, cfg *sqldb.QueryConfig,
//
// This method is part of the PaymentWriter interface, which is embedded in
// the DB interface.
func (s *SQLStore) DeletePayment(paymentHash lntypes.Hash,
func (s *SQLStore) DeletePayment(ctx context.Context, paymentHash lntypes.Hash,
failedHtlcsOnly bool) error {
ctx := context.TODO()
err := s.db.ExecTx(ctx, sqldb.WriteTxOpt(), func(db SQLQueries) error {
dbPayment, err := fetchPaymentByHash(ctx, db, paymentHash)
if err != nil {