diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 95f7fbc4b..de7e36d72 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -259,9 +259,8 @@ func (app *BaseApp) storeConsensusParams(consensusParams *abci.ConsensusParams) func (app *BaseApp) getMaximumBlockGas() (maxGas uint64) { if app.consensusParams == nil || app.consensusParams.BlockSize == nil { return 0 - } else { - return uint64(app.consensusParams.BlockSize.MaxGas) } + return uint64(app.consensusParams.BlockSize.MaxGas) } //______________________________________________________________________________ diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 3dd997150..0994dd361 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -935,8 +935,7 @@ func TestMaxBlockGasLimits(t *testing.T) { for j := 0; j < tc.numDelivers; j++ { res := app.Deliver(tx) - ctx := app.getContextForAnte(runTxModeDeliver, nil) - ctx = app.initializeContext(ctx, runTxModeDeliver) + ctx := app.getState(runTxModeDeliver).ctx blockGasUsed := ctx.BlockGasMeter().GasConsumed() // check for failed transactions diff --git a/cmd/gaia/app/genesis.go b/cmd/gaia/app/genesis.go index 5bc9b577b..15010af98 100644 --- a/cmd/gaia/app/genesis.go +++ b/cmd/gaia/app/genesis.go @@ -262,7 +262,7 @@ func CollectStdTxs(cdc *codec.Codec, moniker string, genTxsDir string, genDoc tm "account %v not in genesis.json: %+v", addr, addrMap) } if acc.Coins.AmountOf(msg.Delegation.Denom).LT(msg.Delegation.Amount) { - err = fmt.Errorf("insufficient fund for the delegation: %s < %s", + err = fmt.Errorf("insufficient fund for the delegation: %v < %v", acc.Coins.AmountOf(msg.Delegation.Denom), msg.Delegation.Amount) } diff --git a/types/gas.go b/types/gas.go index be9a55b77..90c9da3ec 100644 --- a/types/gas.go +++ b/types/gas.go @@ -65,9 +65,8 @@ func (g *basicGasMeter) Limit() Gas { func (g *basicGasMeter) GasConsumedToLimit() Gas { if g.consumed > g.limit { return g.limit - } else { - return g.consumed } + return g.consumed } func (g *basicGasMeter) ConsumeGas(amount Gas, descriptor string) {