lntest: fix most linter warnings, silence rest

We fix all linter issues except for the 'lostcontext' and 'unparam' ones
as those are too numerous and would increase the diff even more.
Therefore we silence them in the itest directory for now.
Because the linter is still not build tag aware, we also have to silence
the unused and deadcode sub linters to not get false positives.
This commit is contained in:
Olaoluwa Osuntokun
2020-01-10 15:27:50 +01:00
committed by Oliver Gugger
parent c769247198
commit 719e32830d
19 changed files with 58 additions and 93 deletions

View File

@@ -120,7 +120,7 @@ func testForwardInterceptor(net *lntest.NetworkHarness, t *harnessTest) {
t.t.Errorf("expected payment to fail, instead got %v", attempt.Status)
}
// For settle and resume we make sure the payment is successfull.
// For settle and resume we make sure the payment is successful.
case routerrpc.ResolveHoldForwardAction_SETTLE:
fallthrough
@@ -164,7 +164,7 @@ func testForwardInterceptor(net *lntest.NetworkHarness, t *harnessTest) {
}
// For all other packets we resolve according to the test case.
interceptor.Send(&routerrpc.ForwardHtlcInterceptResponse{
_ = interceptor.Send(&routerrpc.ForwardHtlcInterceptResponse{
IncomingCircuitKey: request.IncomingCircuitKey,
Action: testCase.interceptorAction,
Preimage: testCase.invoice.RPreimage,