Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yang committed Jan 4, 2025
1 parent 360d13f commit bd03c13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/ante/fixed_gas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() {
Amount: sdk.NewCoins(sdk.NewInt64Coin(appconst.BondDenom, 200)),
},
},
expectedGas: 38175,
expectedGas: 67193,
expectedErr: nil,
},
}
Expand Down
5 changes: 3 additions & 2 deletions x/evm/keeper/bank_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ func (bk NibiruBankKeeper) ForceGasInvariant(
// Note that because the ctx gas meter uses private variables to track gas,
// we have to branch off with a new gas meter instance to avoid mutating the
// "true" gas meter (called GasMeterBefore here).
ctx = ctx.
WithGasMeter(sdk.NewGasMeter(gasMeterBefore.GasRemaining()))
// We use an infinite gas meter because we consume gas in the deferred function
// and gasMeterBefore will panic if we consume too much gas.
ctx = ctx.WithGasMeter(sdk.NewInfiniteGasMeter())

err := BaseOp(ctx)
baseOpGasConsumed = ctx.GasMeter().GasConsumed()
Expand Down

0 comments on commit bd03c13

Please sign in to comment.