lint fix, merge fix
This commit is contained in:
parent
70e60c2f30
commit
6fd3132e71
|
@ -259,9 +259,8 @@ func (app *BaseApp) storeConsensusParams(consensusParams *abci.ConsensusParams)
|
||||||
func (app *BaseApp) getMaximumBlockGas() (maxGas uint64) {
|
func (app *BaseApp) getMaximumBlockGas() (maxGas uint64) {
|
||||||
if app.consensusParams == nil || app.consensusParams.BlockSize == nil {
|
if app.consensusParams == nil || app.consensusParams.BlockSize == nil {
|
||||||
return 0
|
return 0
|
||||||
} else {
|
|
||||||
return uint64(app.consensusParams.BlockSize.MaxGas)
|
|
||||||
}
|
}
|
||||||
|
return uint64(app.consensusParams.BlockSize.MaxGas)
|
||||||
}
|
}
|
||||||
|
|
||||||
//______________________________________________________________________________
|
//______________________________________________________________________________
|
||||||
|
|
|
@ -935,8 +935,7 @@ func TestMaxBlockGasLimits(t *testing.T) {
|
||||||
for j := 0; j < tc.numDelivers; j++ {
|
for j := 0; j < tc.numDelivers; j++ {
|
||||||
res := app.Deliver(tx)
|
res := app.Deliver(tx)
|
||||||
|
|
||||||
ctx := app.getContextForAnte(runTxModeDeliver, nil)
|
ctx := app.getState(runTxModeDeliver).ctx
|
||||||
ctx = app.initializeContext(ctx, runTxModeDeliver)
|
|
||||||
blockGasUsed := ctx.BlockGasMeter().GasConsumed()
|
blockGasUsed := ctx.BlockGasMeter().GasConsumed()
|
||||||
|
|
||||||
// check for failed transactions
|
// check for failed transactions
|
||||||
|
|
|
@ -262,7 +262,7 @@ func CollectStdTxs(cdc *codec.Codec, moniker string, genTxsDir string, genDoc tm
|
||||||
"account %v not in genesis.json: %+v", addr, addrMap)
|
"account %v not in genesis.json: %+v", addr, addrMap)
|
||||||
}
|
}
|
||||||
if acc.Coins.AmountOf(msg.Delegation.Denom).LT(msg.Delegation.Amount) {
|
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)
|
acc.Coins.AmountOf(msg.Delegation.Denom), msg.Delegation.Amount)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,9 +65,8 @@ func (g *basicGasMeter) Limit() Gas {
|
||||||
func (g *basicGasMeter) GasConsumedToLimit() Gas {
|
func (g *basicGasMeter) GasConsumedToLimit() Gas {
|
||||||
if g.consumed > g.limit {
|
if g.consumed > g.limit {
|
||||||
return g.limit
|
return g.limit
|
||||||
} else {
|
|
||||||
return g.consumed
|
|
||||||
}
|
}
|
||||||
|
return g.consumed
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *basicGasMeter) ConsumeGas(amount Gas, descriptor string) {
|
func (g *basicGasMeter) ConsumeGas(amount Gas, descriptor string) {
|
||||||
|
|
Loading…
Reference in New Issue