From ed03cb5c17c2cc58068c7ca7fb6e3e2a21381c42 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 14 Apr 2017 16:40:54 -0400 Subject: [PATCH] consensus/replay: remove timeout --- consensus/replay.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/consensus/replay.go b/consensus/replay.go index d532828f8..4ed5573ee 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -332,23 +332,13 @@ func (h *Handshaker) replayLastBlock(proxyApp proxy.AppConnConsensus) ([]byte, e evsw.Start() defer evsw.Stop() cs.SetEventSwitch(evsw) - newBlockCh := subscribeToEvent(evsw, "consensus-replay", types.EventStringNewBlock(), 1) + log.Notice("Attempting to replay last block", "height", h.store.Height()) // run through the WAL, commit new block, stop if _, err := cs.Start(); err != nil { return nil, err } - defer cs.Stop() - - timeout := h.config.GetInt("timeout_handshake") - timer := time.NewTimer(time.Duration(timeout) * time.Millisecond) - log.Notice("Attempting to replay last block", "height", h.store.Height(), "timeout", timeout) - - select { - case <-newBlockCh: - case <-timer.C: - return nil, ErrReplayLastBlockTimeout - } + cs.Stop() h.nBlocks += 1