From eb226f9de3822b12e12f1386cb18f4a969dcb42c Mon Sep 17 00:00:00 2001 From: Igor Mandrigin <i@mandrigin.ru> Date: Fri, 11 Sep 2020 18:12:39 +0200 Subject: [PATCH] linter1 --- accounts/abi/bind/backends/simulated_test.go | 4 ++-- eth/downloader/downloader.go | 8 ++++---- eth/tracers/tracers_test.go | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/accounts/abi/bind/backends/simulated_test.go b/accounts/abi/bind/backends/simulated_test.go index 01683e412a..4eff446e6a 100644 --- a/accounts/abi/bind/backends/simulated_test.go +++ b/accounts/abi/bind/backends/simulated_test.go @@ -169,7 +169,7 @@ func TestNewSimulatedBackend_AdjustTimeFail(t *testing.T) { if err != nil { t.Errorf("could not sign tx: %v", err) } - sim.SendTransaction(context.Background(), signedTx) + sim.SendTransaction(context.Background(), signedTx) //nolint:errcheck // AdjustTime should fail on non-empty block if err := sim.AdjustTime(time.Second); err == nil { t.Error("Expected adjust time to error on non-empty block") @@ -192,7 +192,7 @@ func TestNewSimulatedBackend_AdjustTimeFail(t *testing.T) { if err != nil { t.Errorf("could not sign tx: %v", err) } - sim.SendTransaction(context.Background(), signedTx2) + sim.SendTransaction(context.Background(), signedTx2) //nolint:errcheck sim.Commit() newTime = sim.pendingBlock.Time() if newTime-prevTime >= uint64(time.Minute.Seconds()) { diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 6a46a329d2..496bd81f54 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -252,10 +252,10 @@ func New(checkpoint uint64, stateDB *ethdb.ObjectDatabase, mux *event.TypeMux, c mode: uint32(StagedSync), stateDB: stateDB, mux: mux, - queue: newQueue(blockCacheMaxItems, blockCacheInitialItems), - peers: newPeerSet(), - rttEstimate: uint64(rttMaxEstimate), - rttConfidence: uint64(1000000), + queue: newQueue(blockCacheMaxItems, blockCacheInitialItems), + peers: newPeerSet(), + rttEstimate: uint64(rttMaxEstimate), + rttConfidence: uint64(1000000), chainConfig: chainConfig, blockchain: chain, lightchain: lightchain, diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index bcd290975e..9e294f511c 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -302,12 +302,12 @@ func jsonEqual(x, y interface{}) bool { xTrace := new(callTrace) yTrace := new(callTrace) if xj, err := json.Marshal(x); err == nil { - json.Unmarshal(xj, xTrace) + json.Unmarshal(xj, xTrace) //nolint: errcheck } else { return false } if yj, err := json.Marshal(y); err == nil { - json.Unmarshal(yj, yTrace) + json.Unmarshal(yj, yTrace) //nolint: errcheck } else { return false } -- GitLab