Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/consensus/state_apply_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ func (c *ApplyCommitAction) Execute(ctx context.Context, stateEvent StateEvent)
stateCopy, err := c.blockExec.finalize(ctx, stateData, commit)
if err != nil {
c.logger.Error("failed to apply block", "err", err)
return nil
// If something went wrong within ABCI client, it can stop and we can't recover from it.
// So, we panic here to ensure that the node will be restarted.
panic(fmt.Errorf("failed to finalize block %X at height %d: %w", block.Hash(), block.Height, err))
}

lastBlockMeta := c.blockStore.LoadBlockMeta(height - 1)
Expand Down
8 changes: 1 addition & 7 deletions internal/state/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,13 +763,7 @@ func execBlockWithoutState(
commit *types.Commit,
logger log.Logger,
) (*abci.ResponseFinalizeBlock, error) {
respFinalizeBlock, err := execBlock(ctx, appConn, block, commit, logger)
if err != nil {
logger.Error("executing block", "err", err)
return respFinalizeBlock, err
}

return respFinalizeBlock, nil
return execBlock(ctx, appConn, block, commit, logger)
}

func (blockExec *BlockExecutor) pruneBlocks(retainHeight int64) {
Expand Down
Loading