chore: log panic recovery in runTx (backport #17556) (#17558)

This commit is contained in:
mergify[bot] 2023-08-28 07:43:39 +00:00 committed by GitHub
parent 992c164b49
commit 2cef4a1aa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -778,6 +778,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()}