@@ -499,8 +499,8 @@ func TestSendPaymentCalls(t *testing.T) {
499499
500500func testSendPayment (t * testing.T , uri string ) {
501501 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 {
504504 Fixed : 0 ,
505505 }}
506506 requestID uint64
@@ -520,7 +520,7 @@ func testSendPayment(t *testing.T, uri string) {
520520 service , err := NewService (t .TempDir (), errFunc )
521521 require .NoError (t , err )
522522
523- err = service .Start (lndMock , routerMock , chainParams )
523+ err = service .Start (ctx , lndMock , routerMock , chainParams )
524524 require .NoError (t , err )
525525
526526 assertBalance := func (id AccountID , expectedBalance int64 ) {
@@ -533,7 +533,7 @@ func testSendPayment(t *testing.T, uri string) {
533533
534534 // This should error because there is no account in the context.
535535 err = service .checkers .checkIncomingRequest (
536- parentCtx , uri , & lnrpc.SendRequest {},
536+ ctx , uri , & lnrpc.SendRequest {},
537537 )
538538 require .ErrorContains (t , err , "no account found in context" )
539539
@@ -543,7 +543,7 @@ func testSendPayment(t *testing.T, uri string) {
543543 )
544544 require .NoError (t , err )
545545
546- ctxWithAcct := AddAccountToContext (parentCtx , acct )
546+ ctxWithAcct := AddAccountToContext (ctx , acct )
547547
548548 // This should error because there is no request ID in the context.
549549 err = service .checkers .checkIncomingRequest (
@@ -552,7 +552,7 @@ func testSendPayment(t *testing.T, uri string) {
552552 require .ErrorContains (t , err , "no request ID found in context" )
553553
554554 reqID1 := nextRequestID ()
555- ctx : = AddRequestIDToContext (ctxWithAcct , reqID1 )
555+ ctx = AddRequestIDToContext (ctxWithAcct , reqID1 )
556556
557557 // This should error because no payment hash is provided.
558558 err = service .checkers .checkIncomingRequest (
@@ -698,7 +698,7 @@ func testSendPayment(t *testing.T, uri string) {
698698func TestSendPaymentV2 (t * testing.T ) {
699699 var (
700700 uri = "/routerrpc.Router/SendPaymentV2"
701- parentCtx = context .Background ()
701+ ctx = context .Background ()
702702 requestID uint64
703703 )
704704
@@ -716,7 +716,7 @@ func TestSendPaymentV2(t *testing.T) {
716716 service , err := NewService (t .TempDir (), errFunc )
717717 require .NoError (t , err )
718718
719- err = service .Start (lndMock , routerMock , chainParams )
719+ err = service .Start (ctx , lndMock , routerMock , chainParams )
720720 require .NoError (t , err )
721721
722722 assertBalance := func (id AccountID , expectedBalance int64 ) {
@@ -729,7 +729,7 @@ func TestSendPaymentV2(t *testing.T) {
729729
730730 // This should error because there is no account in the context.
731731 err = service .checkers .checkIncomingRequest (
732- parentCtx , uri , & routerrpc.SendPaymentRequest {},
732+ ctx , uri , & routerrpc.SendPaymentRequest {},
733733 )
734734 require .ErrorContains (t , err , "no account found in context" )
735735
@@ -739,7 +739,7 @@ func TestSendPaymentV2(t *testing.T) {
739739 )
740740 require .NoError (t , err )
741741
742- ctxWithAcct := AddAccountToContext (parentCtx , acct )
742+ ctxWithAcct := AddAccountToContext (ctx , acct )
743743
744744 // This should error because there is no request ID in the context.
745745 err = service .checkers .checkIncomingRequest (
@@ -748,7 +748,7 @@ func TestSendPaymentV2(t *testing.T) {
748748 require .ErrorContains (t , err , "no request ID found in context" )
749749
750750 reqID1 := nextRequestID ()
751- ctx : = AddRequestIDToContext (ctxWithAcct , reqID1 )
751+ ctx = AddRequestIDToContext (ctxWithAcct , reqID1 )
752752
753753 // This should error because no payment hash is provided.
754754 err = service .checkers .checkIncomingRequest (
@@ -885,7 +885,7 @@ func TestSendPaymentV2(t *testing.T) {
885885func TestSendToRouteV2 (t * testing.T ) {
886886 var (
887887 uri = "/routerrpc.Router/SendToRouteV2"
888- parentCtx = context .Background ()
888+ ctx = context .Background ()
889889 requestID uint64
890890 )
891891
@@ -903,7 +903,7 @@ func TestSendToRouteV2(t *testing.T) {
903903 service , err := NewService (t .TempDir (), errFunc )
904904 require .NoError (t , err )
905905
906- err = service .Start (lndMock , routerMock , chainParams )
906+ err = service .Start (ctx , lndMock , routerMock , chainParams )
907907 require .NoError (t , err )
908908
909909 assertBalance := func (id AccountID , expectedBalance int64 ) {
@@ -916,7 +916,7 @@ func TestSendToRouteV2(t *testing.T) {
916916
917917 // This should error because there is no account in the context.
918918 err = service .checkers .checkIncomingRequest (
919- parentCtx , uri , & routerrpc.SendToRouteRequest {},
919+ ctx , uri , & routerrpc.SendToRouteRequest {},
920920 )
921921 require .ErrorContains (t , err , "no account found in context" )
922922
@@ -926,7 +926,7 @@ func TestSendToRouteV2(t *testing.T) {
926926 )
927927 require .NoError (t , err )
928928
929- ctxWithAcct := AddAccountToContext (parentCtx , acct )
929+ ctxWithAcct := AddAccountToContext (ctx , acct )
930930
931931 // This should error because there is no request ID in the context.
932932 err = service .checkers .checkIncomingRequest (
@@ -935,7 +935,7 @@ func TestSendToRouteV2(t *testing.T) {
935935 require .ErrorContains (t , err , "no request ID found in context" )
936936
937937 reqID1 := nextRequestID ()
938- ctx : = AddRequestIDToContext (ctxWithAcct , reqID1 )
938+ ctx = AddRequestIDToContext (ctxWithAcct , reqID1 )
939939
940940 // This should error because no payment hash is provided.
941941 err = service .checkers .checkIncomingRequest (
0 commit comments