multi: thread context through InitPayment

This commit is contained in:
ziggie committed 2026-02-25 08:02:23 +01:00
1 parent 10062ca9ac
commit 60026494b1
9 files changed
+46 -39

No files matched your search

+1 -3
View File
@@ -1265,11 +1265,9 @@ func (s *SQLStore) DeletePayment(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, representing
// the first step in the payment lifecycle control flow.
func (s *SQLStore) InitPayment(paymentHash lntypes.Hash,
func (s *SQLStore) InitPayment(ctx context.Context, paymentHash lntypes.Hash,
paymentCreationInfo *PaymentCreationInfo) error {
ctx := context.TODO()
// Create the payment in the database.
err := s.db.ExecTx(ctx, sqldb.WriteTxOpt(), func(db SQLQueries) error {
existingPayment, err := db.FetchPayment(ctx, paymentHash[:])