From ef40d46c0efbda50f0a2b84987291a4b8f9f2a2d Mon Sep 17 00:00:00 2001 From: David Date: Mon, 27 May 2024 10:37:32 +0800 Subject: [PATCH] feat(txpool): update max fee check in `ValidateTransaction()` (#259) --- core/txpool/validation.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/txpool/validation.go b/core/txpool/validation.go index cb7fb9f975ed..45dfe33a9b85 100644 --- a/core/txpool/validation.go +++ b/core/txpool/validation.go @@ -98,9 +98,9 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types if tx.GasFeeCapIntCmp(tx.GasTipCap()) < 0 { return core.ErrTipAboveFeeCap } - // CHANGE(taiko): ensure gasFeeCap fee cap larger than 0.01 GWei - if os.Getenv("TAIKO_TEST") == "" && tx.GasFeeCap().Cmp(new(big.Int).SetUint64(params.GWei/100)) < 0 { - return errors.New("max fee per gas is less than 0.01 GWei") + // CHANGE(taiko): ensure gasFeeCap fee cap larger than 0. + if os.Getenv("TAIKO_TEST") == "" && tx.GasFeeCap().Cmp(common.Big0) == 0 { + return errors.New("max fee per gas is 0") } // Make sure the transaction is signed properly if _, err := types.Sender(signer, tx); err != nil {