Browse Source

fix lint

pull/8091/head
tycho garen 3 years ago
parent
commit
f261a68adc
2 changed files with 4 additions and 5 deletions
  1. +3
    -1
      internal/consensus/common_test.go
  2. +1
    -4
      internal/consensus/state.go

+ 3
- 1
internal/consensus/common_test.go View File

@ -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 {


+ 1
- 4
internal/consensus/state.go View File

@ -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
}


Loading…
Cancel
Save