node: refactor privValidator ext client code & tests (#2895)

* update ConsensusState#OnStop comment

* consensus: set logger for WAL in tests

* refactor privValidator client code and tests

follow-up on https://github.com/tendermint/tendermint/pull/2866
This commit is contained in:
Anton Kaliaev
2018-11-21 21:24:13 +04:00
committed by GitHub
parent 72f86b5192
commit b487feba42
7 changed files with 105 additions and 142 deletions

View File

@@ -324,10 +324,11 @@ func (cs *ConsensusState) startRoutines(maxSteps int) {
go cs.receiveRoutine(maxSteps)
}
// OnStop implements cmn.Service. It stops all routines and waits for the WAL to finish.
// OnStop implements cmn.Service.
func (cs *ConsensusState) OnStop() {
cs.evsw.Stop()
cs.timeoutTicker.Stop()
// WAL is stopped in receiveRoutine.
}
// Wait waits for the the main routine to return.