From eef05552c7353beba3639936344b335ff4a49a17 Mon Sep 17 00:00:00 2001 From: Loredana Date: Sun, 6 Mar 2022 02:50:49 +0200 Subject: [PATCH] Fix lint --- app/ante/eth.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/ante/eth.go b/app/ante/eth.go index 77f14f9cdc..0908377ceb 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -159,6 +159,7 @@ func NewEthGasConsumeDecorator( // - transaction's gas limit is lower than the intrinsic gas // - user doesn't have enough balance to deduct the transaction fees (gas_limit * gas_price) // - transaction or block gas meter runs out of gas +// - sets the gas meter limit func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { params := egcd.evmKeeper.GetParams(ctx) @@ -218,7 +219,7 @@ func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula // Set ctx.GasMeter with a limit of GasWanted (gasLimit) gasConsumed := ctx.GasMeter().GasConsumed() ctx = ctx.WithGasMeter(ethermint.NewInfiniteGasMeterWithLimit(gasWanted)) - ctx.GasMeter().ConsumeGas(uint64(gasConsumed), "copy gas consumed") + ctx.GasMeter().ConsumeGas(gasConsumed, "copy gas consumed") // we know that we have enough gas on the pool to cover the intrinsic gas return next(ctx, tx, simulate) @@ -316,8 +317,6 @@ func NewEthIncrementSenderSequenceDecorator(ak evmtypes.AccountKeeper) EthIncrem // AnteHandle handles incrementing the sequence of the signer (i.e sender). If the transaction is a // contract creation, the nonce will be incremented during the transaction execution and not within // this AnteHandler decorator. -// being the innermost decorator, it also resets the GasMeter with a limit -// based on user provided gas limit func (issd EthIncrementSenderSequenceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { for _, msg := range tx.GetMsgs() { msgEthTx, ok := msg.(*evmtypes.MsgEthereumTx)