chore: log panic recovery in runTx (#17556)

This commit is contained in:
Cal Bera
2023-08-28 07:22:08 +00:00
committed by GitHub
parent bb0c866193
commit cc6511e337
+1
View File
@@ -807,6 +807,7 @@ func (app *BaseApp) runTx(mode execMode, txBytes []byte) (gInfo sdk.GasInfo, res
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()}