@@ -190,7 +190,7 @@ func createTestPayments(t *testing.T, p DB, payments []*payment) {
190190 // Settle the attempt
191191 case StatusSucceeded :
192192 _ , err := p .SettleAttempt (
193- info .PaymentIdentifier , attempt .AttemptID ,
193+ ctx , info .PaymentIdentifier , attempt .AttemptID ,
194194 & HTLCSettleInfo {
195195 Preimage : preimg ,
196196 },
@@ -1337,6 +1337,7 @@ func TestSuccessesWithoutInFlight(t *testing.T) {
13371337
13381338 // Attempt to complete the payment should fail.
13391339 _ , err = paymentDB .SettleAttempt (
1340+ t .Context (),
13401341 info .PaymentIdentifier , 0 ,
13411342 & HTLCSettleInfo {
13421343 Preimage : preimg ,
@@ -1484,7 +1485,7 @@ func TestSwitchDoubleSend(t *testing.T) {
14841485
14851486 // After settling, the error should be ErrAlreadyPaid.
14861487 _ , err = paymentDB .SettleAttempt (
1487- info .PaymentIdentifier , attempt .AttemptID ,
1488+ ctx , info .PaymentIdentifier , attempt .AttemptID ,
14881489 & HTLCSettleInfo {
14891490 Preimage : preimg ,
14901491 },
@@ -1620,7 +1621,7 @@ func TestSwitchFail(t *testing.T) {
16201621 // Settle the attempt and verify that status was changed to
16211622 // StatusSucceeded.
16221623 payment , err = paymentDB .SettleAttempt (
1623- info .PaymentIdentifier , attempt .AttemptID ,
1624+ ctx , info .PaymentIdentifier , attempt .AttemptID ,
16241625 & HTLCSettleInfo {
16251626 Preimage : preimg ,
16261627 },
@@ -1793,7 +1794,7 @@ func TestMultiShard(t *testing.T) {
17931794 var firstFailReason * FailureReason
17941795 if test .settleFirst {
17951796 _ , err := paymentDB .SettleAttempt (
1796- info .PaymentIdentifier , a .AttemptID ,
1797+ ctx , info .PaymentIdentifier , a .AttemptID ,
17971798 & HTLCSettleInfo {
17981799 Preimage : preimg ,
17991800 },
@@ -1887,7 +1888,7 @@ func TestMultiShard(t *testing.T) {
18871888 if test .settleLast {
18881889 // Settle the last outstanding attempt.
18891890 _ , err = paymentDB .SettleAttempt (
1890- info .PaymentIdentifier , a .AttemptID ,
1891+ ctx , info .PaymentIdentifier , a .AttemptID ,
18911892 & HTLCSettleInfo {
18921893 Preimage : preimg ,
18931894 },
@@ -2377,7 +2378,7 @@ func TestQueryPayments(t *testing.T) {
23772378 copy (preimg [:], rev [:])
23782379
23792380 _ , err = paymentDB .SettleAttempt (
2380- lastPaymentInfo .PaymentIdentifier ,
2381+ ctx , lastPaymentInfo .PaymentIdentifier ,
23812382 attempt .AttemptID ,
23822383 & HTLCSettleInfo {
23832384 Preimage : preimg ,
0 commit comments