Skip to content

Commit

Permalink
- lint
Browse files Browse the repository at this point in the history
  • Loading branch information
StrathCole committed Sep 23, 2024
1 parent f391122 commit 6135512
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 6135512

Please sign in to comment.