change default maxGasWanted (#1208)

This commit is contained in:
Freddy Caceres
2022-07-28 19:14:46 +00:00
committed by GitHub
parent 29d3abcf09
commit ebbffc685c
4 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -194,7 +194,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
+1 -1
View File
@@ -280,7 +280,7 @@ func (suite AnteTestSuite) TestEthGasConsumeDecorator() {
{
"success",
tx2,
config.DefaultMaxTxGasWanted, // it's capped
tx2GasLimit, // it's capped
func() {
vmdb.AddBalance(addr, big.NewInt(1000000))