From 6135512ab5ce34a01e4ede4f7cefd933ca97eb13 Mon Sep 17 00:00:00 2001 From: StrathCole Date: Mon, 23 Sep 2024 10:10:19 +0200 Subject: [PATCH] - lint --- app/app.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/app.go b/app/app.go index 73e451ac..198e46b2 100644 --- a/app/app.go +++ b/app/app.go @@ -138,10 +138,10 @@ func (app *TerraApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { for _, event := range res.Events { if event.Type == "tax2gas" { for _, attr := range event.Attributes { - if string(attr.Key) == "tax_gas" { - value, ok := sdkmath.NewIntFromString(string(attr.Value)) + if attr.Key == "tax_gas" { + value, ok := sdkmath.NewIntFromString(attr.Value) if !ok { - ctx.Logger().Error("failed to parse tax gas from events", "value", string(attr.Value)) + ctx.Logger().Error("failed to parse tax gas from events", "value", attr.Value) continue } @@ -170,8 +170,8 @@ func (app *TerraApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { gasWanted -= subTaxGas } - //maxGas := app.BaseApp.GetConsensusParams(ctx).Block.MaxGas - //fmt.Println("GasWanted", res.GasWanted, "GasUsed", res.GasUsed, "TaxGas", taxGas, "MaxGas", maxGas, "Multiple", multiple, "GasWantedAdjusted", gasWanted) + // maxGas := app.BaseApp.GetConsensusParams(ctx).Block.MaxGas + // fmt.Println("GasWanted", res.GasWanted, "GasUsed", res.GasUsed, "TaxGas", taxGas, "MaxGas", maxGas, "Multiple", multiple, "GasWantedAdjusted", gasWanted) // if the gas wanted is still higher than the gas used, we can adjust the gas wanted if gasWanted >= gasUsed {