Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Federico Kunze Küllmer <[email protected]>
  • Loading branch information
Vvaradinov and fedekunze authored Jan 10, 2023
1 parent acf5f4e commit 42248af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, re
return gInfo, nil, events, priority, err
}

// Case 2: Run PostHandler and only
// Case 2: tx errors and the post handler is set. Run PostHandler and revert state from runMsgs
if err != nil && app.postHandler != nil {
// Run optional postHandlers with a context branched off the ante handler ctx
postCtx, postCache := app.cacheTxContext(ctx, txBytes)
Expand Down Expand Up @@ -761,7 +761,7 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, re
return gInfo, result, events, priority, err
}

// Case 3: Run Post Handler with runMsgCtx so that the state from runMsgs is persisted
// Case 3: tx successful and post handler is set. Run Post Handler with runMsgCtx so that the state from runMsgs is persisted
if app.postHandler != nil {
newCtx, err := app.postHandler(runMsgCtx, tx, mode == runTxModeSimulate, err == nil)
if err != nil {
Expand Down

0 comments on commit 42248af

Please sign in to comment.