multi: thread context through InitPayment
This commit is contained in:
9 files changed
+46
-39
No files matched your search
@@ -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[:])
|
||||
|
||||
Reference in new issue
Block a user