@@ -499,8 +499,8 @@ func TestSendPaymentCalls(t *testing.T) {
499
499
500
500
func testSendPayment (t * testing.T , uri string ) {
501
501
var (
502
- parentCtx = context .Background ()
503
- zeroFee = & lnrpc.FeeLimit {Limit : & lnrpc.FeeLimit_Fixed {
502
+ ctx = context .Background ()
503
+ zeroFee = & lnrpc.FeeLimit {Limit : & lnrpc.FeeLimit_Fixed {
504
504
Fixed : 0 ,
505
505
}}
506
506
requestID uint64
@@ -520,7 +520,7 @@ func testSendPayment(t *testing.T, uri string) {
520
520
service , err := NewService (t .TempDir (), errFunc )
521
521
require .NoError (t , err )
522
522
523
- err = service .Start (lndMock , routerMock , chainParams )
523
+ err = service .Start (ctx , lndMock , routerMock , chainParams )
524
524
require .NoError (t , err )
525
525
526
526
assertBalance := func (id AccountID , expectedBalance int64 ) {
@@ -533,7 +533,7 @@ func testSendPayment(t *testing.T, uri string) {
533
533
534
534
// This should error because there is no account in the context.
535
535
err = service .checkers .checkIncomingRequest (
536
- parentCtx , uri , & lnrpc.SendRequest {},
536
+ ctx , uri , & lnrpc.SendRequest {},
537
537
)
538
538
require .ErrorContains (t , err , "no account found in context" )
539
539
@@ -543,7 +543,7 @@ func testSendPayment(t *testing.T, uri string) {
543
543
)
544
544
require .NoError (t , err )
545
545
546
- ctxWithAcct := AddAccountToContext (parentCtx , acct )
546
+ ctxWithAcct := AddAccountToContext (ctx , acct )
547
547
548
548
// This should error because there is no request ID in the context.
549
549
err = service .checkers .checkIncomingRequest (
@@ -552,7 +552,7 @@ func testSendPayment(t *testing.T, uri string) {
552
552
require .ErrorContains (t , err , "no request ID found in context" )
553
553
554
554
reqID1 := nextRequestID ()
555
- ctx : = AddRequestIDToContext (ctxWithAcct , reqID1 )
555
+ ctx = AddRequestIDToContext (ctxWithAcct , reqID1 )
556
556
557
557
// This should error because no payment hash is provided.
558
558
err = service .checkers .checkIncomingRequest (
@@ -698,7 +698,7 @@ func testSendPayment(t *testing.T, uri string) {
698
698
func TestSendPaymentV2 (t * testing.T ) {
699
699
var (
700
700
uri = "/routerrpc.Router/SendPaymentV2"
701
- parentCtx = context .Background ()
701
+ ctx = context .Background ()
702
702
requestID uint64
703
703
)
704
704
@@ -716,7 +716,7 @@ func TestSendPaymentV2(t *testing.T) {
716
716
service , err := NewService (t .TempDir (), errFunc )
717
717
require .NoError (t , err )
718
718
719
- err = service .Start (lndMock , routerMock , chainParams )
719
+ err = service .Start (ctx , lndMock , routerMock , chainParams )
720
720
require .NoError (t , err )
721
721
722
722
assertBalance := func (id AccountID , expectedBalance int64 ) {
@@ -729,7 +729,7 @@ func TestSendPaymentV2(t *testing.T) {
729
729
730
730
// This should error because there is no account in the context.
731
731
err = service .checkers .checkIncomingRequest (
732
- parentCtx , uri , & routerrpc.SendPaymentRequest {},
732
+ ctx , uri , & routerrpc.SendPaymentRequest {},
733
733
)
734
734
require .ErrorContains (t , err , "no account found in context" )
735
735
@@ -739,7 +739,7 @@ func TestSendPaymentV2(t *testing.T) {
739
739
)
740
740
require .NoError (t , err )
741
741
742
- ctxWithAcct := AddAccountToContext (parentCtx , acct )
742
+ ctxWithAcct := AddAccountToContext (ctx , acct )
743
743
744
744
// This should error because there is no request ID in the context.
745
745
err = service .checkers .checkIncomingRequest (
@@ -748,7 +748,7 @@ func TestSendPaymentV2(t *testing.T) {
748
748
require .ErrorContains (t , err , "no request ID found in context" )
749
749
750
750
reqID1 := nextRequestID ()
751
- ctx : = AddRequestIDToContext (ctxWithAcct , reqID1 )
751
+ ctx = AddRequestIDToContext (ctxWithAcct , reqID1 )
752
752
753
753
// This should error because no payment hash is provided.
754
754
err = service .checkers .checkIncomingRequest (
@@ -885,7 +885,7 @@ func TestSendPaymentV2(t *testing.T) {
885
885
func TestSendToRouteV2 (t * testing.T ) {
886
886
var (
887
887
uri = "/routerrpc.Router/SendToRouteV2"
888
- parentCtx = context .Background ()
888
+ ctx = context .Background ()
889
889
requestID uint64
890
890
)
891
891
@@ -903,7 +903,7 @@ func TestSendToRouteV2(t *testing.T) {
903
903
service , err := NewService (t .TempDir (), errFunc )
904
904
require .NoError (t , err )
905
905
906
- err = service .Start (lndMock , routerMock , chainParams )
906
+ err = service .Start (ctx , lndMock , routerMock , chainParams )
907
907
require .NoError (t , err )
908
908
909
909
assertBalance := func (id AccountID , expectedBalance int64 ) {
@@ -916,7 +916,7 @@ func TestSendToRouteV2(t *testing.T) {
916
916
917
917
// This should error because there is no account in the context.
918
918
err = service .checkers .checkIncomingRequest (
919
- parentCtx , uri , & routerrpc.SendToRouteRequest {},
919
+ ctx , uri , & routerrpc.SendToRouteRequest {},
920
920
)
921
921
require .ErrorContains (t , err , "no account found in context" )
922
922
@@ -926,7 +926,7 @@ func TestSendToRouteV2(t *testing.T) {
926
926
)
927
927
require .NoError (t , err )
928
928
929
- ctxWithAcct := AddAccountToContext (parentCtx , acct )
929
+ ctxWithAcct := AddAccountToContext (ctx , acct )
930
930
931
931
// This should error because there is no request ID in the context.
932
932
err = service .checkers .checkIncomingRequest (
@@ -935,7 +935,7 @@ func TestSendToRouteV2(t *testing.T) {
935
935
require .ErrorContains (t , err , "no request ID found in context" )
936
936
937
937
reqID1 := nextRequestID ()
938
- ctx : = AddRequestIDToContext (ctxWithAcct , reqID1 )
938
+ ctx = AddRequestIDToContext (ctxWithAcct , reqID1 )
939
939
940
940
// This should error because no payment hash is provided.
941
941
err = service .checkers .checkIncomingRequest (
0 commit comments