From fe1c60b5cf4defc8a5a6acc7bf99bf3141a211d9 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 27 Oct 2017 10:55:20 -0400 Subject: [PATCH] consensus: kill process on app error --- consensus/state.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/consensus/state.go b/consensus/state.go index e01c2ab25..c2868c80a 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -1204,6 +1204,10 @@ func (cs *ConsensusState) finalizeCommit(height int) { err := stateCopy.ApplyBlock(eventCache, cs.proxyAppConn, block, blockParts.Header(), cs.mempool) if err != nil { cs.Logger.Error("Error on ApplyBlock. Did the application crash? Please restart tendermint", "err", err) + err := cmn.Kill() + if err != nil { + cs.Logger.Error("Failed to kill this process - please do so manually", "err", err) + } return }