fixes from review

This commit is contained in:
Ethan Buchman
2016-08-17 23:08:43 -04:00
parent 1110c5d37d
commit 3998bdbfc1
4 changed files with 17 additions and 29 deletions

View File

@ -78,12 +78,7 @@ func (cs *ConsensusState) readReplayMessage(msgBytes []byte, newStepCh chan inte
// replay only those messages since the last block.
// timeoutRoutine should run concurrently to read off tickChan
func (cs *ConsensusState) catchupReplay(height int) error {
if cs.wal == nil {
log.Warn("consensus msg log is nil")
return nil
}
if !cs.wal.exists {
// new wal, nothing to catchup on
if !cs.wal.Exists() {
return nil
}
@ -254,8 +249,9 @@ func (pb *playback) replayReset(count int, newStepCh chan interface{}) error {
}
func (cs *ConsensusState) startForReplay() {
// don't want to start full cs
cs.BaseService.OnStart()
go cs.receiveRoutine(0)
// since we replay tocks we just ignore ticks
go func() {
for {