Browse Source

fix lint

pull/8127/head
tycho garen 3 years ago
committed by M. J. Fromberger
parent
commit
baff005c2c
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

@ -908,7 +908,9 @@ func randConsensusNetWithPeers(
css[i] = newStateWithConfig(ctx, t, logger.With("validator", i, "module", "consensus"), thisConfig, state, privVal, app) css[i] = newStateWithConfig(ctx, t, logger.With("validator", i, "module", "consensus"), thisConfig, state, privVal, app)
css[i].SetTimeoutTicker(tickerFunc()) css[i].SetTimeoutTicker(tickerFunc())
css[i].updateStateFromStore(ctx)
if err := css[i].updateStateFromStore(ctx); err != nil {
t.Fatal(err)
}
} }
return css, genDoc, peer0Config, func() { return css, genDoc, peer0Config, func() {
for _, dir := range configRootDirs { for _, dir := range configRootDirs {


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

@ -1102,10 +1102,7 @@ func (cs *State) handleTxsAvailable(ctx context.Context) {
if func() bool { if func() bool {
cs.mtx.RLock() cs.mtx.RLock()
defer cs.mtx.RUnlock() defer cs.mtx.RUnlock()
if cs.Round != 0 {
return true
}
return false
return cs.Round != 0
}() { }() {
return return
} }


Loading…
Cancel
Save