From f261a68adc1be83f21cba2d951eb566bee8a02f3 Mon Sep 17 00:00:00 2001 From: tycho garen Date: Fri, 11 Mar 2022 09:48:03 -0500 Subject: [PATCH] fix lint --- internal/consensus/common_test.go | 4 +++- internal/consensus/state.go | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/consensus/common_test.go b/internal/consensus/common_test.go index c09efa0c7..4172d889c 100644 --- a/internal/consensus/common_test.go +++ b/internal/consensus/common_test.go @@ -898,7 +898,9 @@ func randConsensusNetWithPeers( css[i] = newStateWithConfig(ctx, t, logger.With("validator", i, "module", "consensus"), thisConfig, state, privVal, app) css[i].SetTimeoutTicker(tickerFunc()) - css[i].updateStateFromStore(ctx) + if err := css[i].updateStateFromStore(ctx); err != nil { + t.Fatal(err) + } } return css, genDoc, peer0Config, func() { for _, dir := range configRootDirs { diff --git a/internal/consensus/state.go b/internal/consensus/state.go index fe1b889c2..9ba280bb0 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -1087,10 +1087,7 @@ func (cs *State) handleTxsAvailable(ctx context.Context) { if func() bool { cs.mtx.RLock() defer cs.mtx.RUnlock() - if cs.Round != 0 { - return true - } - return false + return cs.Round != 0 }() { return }