mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-06 08:07:11 +00:00
fixes from review
This commit is contained in:
+1
-1
@@ -326,7 +326,6 @@ func (h *Handshaker) replayBlocks(proxyApp proxy.AppConns, appBlockHeight, store
|
||||
func (h *Handshaker) replayLastBlock(proxyApp proxy.AppConnConsensus) ([]byte, error) {
|
||||
mempool := types.MockMempool{}
|
||||
cs := NewConsensusState(h.config, h.state, proxyApp, h.store, mempool)
|
||||
defer cs.Stop()
|
||||
|
||||
evsw := types.NewEventSwitch()
|
||||
evsw.Start()
|
||||
@@ -338,6 +337,7 @@ func (h *Handshaker) replayLastBlock(proxyApp proxy.AppConnConsensus) ([]byte, e
|
||||
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)
|
||||
|
||||
+3
-2
@@ -358,8 +358,9 @@ func (cs *ConsensusState) OnStart() error {
|
||||
// we may have lost some votes if the process crashed
|
||||
// reload from consensus log to catchup
|
||||
if err := cs.catchupReplay(cs.Height); err != nil {
|
||||
log.Error("Error on catchup replay", "error", err.Error())
|
||||
// let's go for it anyways, maybe we're fine
|
||||
log.Error("Error on catchup replay. Proceeding to start ConsensusState anyway", "error", err.Error())
|
||||
// NOTE: if we ever do return an error here,
|
||||
// make sure to stop the timeoutTicker
|
||||
}
|
||||
|
||||
// now start the receiveRoutine
|
||||
|
||||
Reference in New Issue
Block a user