Skip to content

Commit

Permalink
conflicts
Browse files Browse the repository at this point in the history
(cherry picked from commit 7482175)
  • Loading branch information
facs95 authored and devon-chain committed Nov 10, 2022
1 parent 0584fb7 commit d1bffae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/ante/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
return ctx, sdkerrors.Wrap(err, "failed to unpack tx data")
}

if ctx.IsCheckTx() {
if ctx.IsCheckTx() && egcd.maxGasWanted != 0 {
// We can't trust the tx gas limit, because we'll refund the unused gas.
if txData.GetGas() > egcd.maxGasWanted {
gasWanted += egcd.maxGasWanted
Expand Down
2 changes: 1 addition & 1 deletion app/ante/eth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (suite AnteTestSuite) TestEthGasConsumeDecorator() {
{
"success",
tx2,
config.DefaultMaxTxGasWanted, // it's capped
tx2GasLimit, // it's capped
func() {
vmdb.AddBalance(addr, big.NewInt(1000000))

Expand Down
2 changes: 1 addition & 1 deletion server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (
// DefaultEVMTracer is the default vm.Tracer type
DefaultEVMTracer = ""

DefaultMaxTxGasWanted = 500000
DefaultMaxTxGasWanted = 0

DefaultGasCap uint64 = 25000000

Expand Down

0 comments on commit d1bffae

Please sign in to comment.