From 803192299355d733630bd33819f0be08a06a744d Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 27 Feb 2020 22:11:41 -0800 Subject: [PATCH 1/2] Remove gas call --- baseapp/baseapp.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 3837a34ccc9a..6fa6a943dca1 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -581,8 +581,7 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte, tx sdk.Tx) (gInfo sdk. msgs := tx.GetMsgs() if err := validateBasicTxMsgs(msgs); err != nil { - gInfo = sdk.GasInfo{GasUsed: ctx.BlockGasMeter().GasConsumed()} - return gInfo, nil, err + return sdk.GasInfo{}, nil, err } if app.anteHandler != nil { From 71fbbb8fba3de10b5879ef94c9444c6a1a9eb145 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 27 Feb 2020 22:13:54 -0800 Subject: [PATCH 2/2] Add changelog entries --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c3a38ae1e37..096ed8204b93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,8 @@ to now accept a `codec.JSONMarshaler` for modular serialization of genesis state ### Bug Fixes +* (baseapp) [\#5718](https://github.com/cosmos/cosmos-sdk/pull/5718) Remove call to `ctx.BlockGasMeter` during failed message validation which +resulted in a panic when the tx execution mode was `CheckTx`. * (client) [\#5618](https://github.com/cosmos/cosmos-sdk/pull/5618) Fix crash on the client when the verifier is not set. * (x/distribution) [\#5620](https://github.com/cosmos/cosmos-sdk/pull/5620) Fix nil pointer deref in distribution tax/rewward validation helpers. * (genesis) [\#5086](https://github.com/cosmos/cosmos-sdk/issues/5086) Ensure `gentxs` are always an empty array instead of `nil`