From 5284cd6b7d128646b141ae454bc8b9eb8b975608 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 22 May 2024 20:46:57 +0800 Subject: [PATCH] feat(txpool): update `ValidateTransaction` (#255) * feat(txpool): update `ValidateTransaction` * feat(txpool): update `ValidateTransaction` --- 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 b60af4b0027a..62fa888ece6f 100644 --- a/core/txpool/validation.go +++ b/core/txpool/validation.go @@ -103,9 +103,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 - if os.Getenv("TAIKO_TEST") == "" && tx.GasFeeCap().Cmp(common.Big0) == 0 { - return errors.New("max fee per gas is equal to 0") + // 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") } // Make sure the transaction is signed properly if _, err := types.Sender(signer, tx); err != nil {