@@ -383,13 +383,14 @@ func TestAccountService(t *testing.T) {
383
383
// Assert that the invoice subscription succeeded.
384
384
require .Contains (t , s .invoiceToAccount , testHash )
385
385
386
- // But setting up the payment tracking should have failed.
386
+ // But setting up the payment tracking should have
387
+ // failed.
387
388
require .False (t , s .IsRunning ())
388
389
389
- // Finally let's assert that we didn't successfully add the
390
- // payment to pending payment, and that lnd isn't awaiting
391
- // the payment request.
392
- require .NotContains (t , s .pendingPayments , testHash )
390
+ // Finally let's assert that we didn't successfully add
391
+ // the payment to pending payment, and that lnd isn't
392
+ // awaiting the payment request.
393
+ require .False (t , s .hasPayment ( testHash ) )
393
394
r .assertNoPaymentRequest (t )
394
395
},
395
396
}, {
@@ -426,7 +427,9 @@ func TestAccountService(t *testing.T) {
426
427
// This will cause an error send an update over
427
428
// the payment channel, which should disable the
428
429
// service.
429
- s .pendingPayments = make (map [lntypes.Hash ]* trackedPayment )
430
+ s .pendingPayments = make (
431
+ map [lntypes.Hash ]* trackedPayment ,
432
+ )
430
433
431
434
// Send an invalid payment over the payment chan
432
435
// which should error and disable the service
@@ -568,7 +571,7 @@ func TestAccountService(t *testing.T) {
568
571
return p .Status == lnrpc .Payment_FAILED
569
572
})
570
573
571
- require .NotContains (t , s .pendingPayments , testHash2 )
574
+ require .False (t , s .hasPayment ( testHash2 ) )
572
575
573
576
// Finally, if an unknown payment turns out to be
574
577
// a non-initiated payment, we should stop the tracking
@@ -616,7 +619,7 @@ func TestAccountService(t *testing.T) {
616
619
617
620
// Ensure that the payment was removed from the pending
618
621
// payments.
619
- require .NotContains (t , s .pendingPayments , testHash3 )
622
+ require .False (t , s .hasPayment ( testHash3 ) )
620
623
},
621
624
}, {
622
625
name : "keep track of invoice indexes" ,
0 commit comments