From ad3ced8d90f1c753aa0d6b31ba10488d60909f6f Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Fri, 31 May 2024 11:25:25 +0800 Subject: [PATCH] core: check effective tip in txpool pricelimit validation (#23855) --- core/tx_pool.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/tx_pool.go b/core/tx_pool.go index be8cbf2454c2..daf184506264 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -673,8 +673,9 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error { if err != nil { return ErrInvalidSender } - // Drop non-local transactions under our own minimal accepted gas price or tip - if !local && tx.GasTipCapIntCmp(pool.gasPrice) < 0 { + // Drop non-local transactions under our own minimal accepted gas price or tip. + pendingBaseFee := pool.priced.urgent.baseFee + if !local && tx.EffectiveGasTipIntCmp(pool.gasPrice, pendingBaseFee) < 0 { if !tx.IsSpecialTransaction() || (pool.IsSigner != nil && !pool.IsSigner(from)) { return ErrUnderpriced }