Skip to content

Commit

Permalink
suggestions from Julien
Browse files Browse the repository at this point in the history
  • Loading branch information
facundomedica committed Nov 28, 2024
1 parent e320f48 commit d94bde6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,9 +996,10 @@ func (app *BaseApp) Commit() (*abci.CommitResponse, error) {
if err := abciListener.ListenCommit(ctx, *resp, changeSet); err != nil {
app.logger.Error("Commit listening hook failed", "height", blockHeight, "err", err)
if app.streamingManager.StopNodeOnErr {
err = fmt.Errorf("Commit listening hook failed: %w", err)
rollbackErr := app.cms.RollbackToVersion(blockHeight - 1)
if rollbackErr != nil {
return nil, rollbackErr
return nil, errors.Join(err, rollbackErr)
}
return nil, err
}
Expand Down

0 comments on commit d94bde6

Please sign in to comment.