forked from cerc-io/laconicd-deprecated
change default maxGasWanted (#1208)
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user