Skip to content

Commit

Permalink
chore: log panic recovery in runTx (cosmos#17556)
Browse files Browse the repository at this point in the history
  • Loading branch information
calbera authored and mmsqe committed Sep 11, 2023
1 parent 980e17c commit 2424c11
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, re
if r := recover(); r != nil {
recoveryMW := newOutOfGasRecoveryMiddleware(gasWanted, ctx, app.runTxRecoveryMiddleware)
err, result = processRecovery(r, recoveryMW), nil
ctx.Logger().Error("panic recovered in runTx", "err", err)
}

gInfo = sdk.GasInfo{GasWanted: gasWanted, GasUsed: ctx.GasMeter().GasConsumed()}
Expand Down

0 comments on commit 2424c11

Please sign in to comment.