mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 23:02:16 +00:00
consensus: nice error msg if ApplyBlock fails
This commit is contained in:
parent
6403b2f468
commit
edc5e272db
@ -1232,7 +1232,8 @@ func (cs *ConsensusState) finalizeCommit(height int) {
|
|||||||
seenCommit := precommits.MakeCommit()
|
seenCommit := precommits.MakeCommit()
|
||||||
cs.blockStore.SaveBlock(block, blockParts, seenCommit)
|
cs.blockStore.SaveBlock(block, blockParts, seenCommit)
|
||||||
} else {
|
} else {
|
||||||
log.Warn("Why are we finalizeCommitting a block height we already have?", "height", block.Height)
|
// Happens during replay if we already saved the block but didn't commit
|
||||||
|
log.Notice("Calling finalizeCommit on already stored block", "height", block.Height)
|
||||||
}
|
}
|
||||||
|
|
||||||
fail.Fail() // XXX
|
fail.Fail() // XXX
|
||||||
@ -1247,7 +1248,8 @@ func (cs *ConsensusState) finalizeCommit(height int) {
|
|||||||
// NOTE: the block.AppHash wont reflect these txs until the next block
|
// NOTE: the block.AppHash wont reflect these txs until the next block
|
||||||
err := stateCopy.ApplyBlock(eventCache, cs.proxyAppConn, block, blockParts.Header(), cs.mempool)
|
err := stateCopy.ApplyBlock(eventCache, cs.proxyAppConn, block, blockParts.Header(), cs.mempool)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// TODO!
|
log.Warn("Error on ApplyBlock. Did the application crash? Please restart tendermint", "error", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
fail.Fail() // XXX
|
fail.Fail() // XXX
|
||||||
|
Loading…
x
Reference in New Issue
Block a user