Merge pull request #926 from gzliudan/fix-zero-tip-tx

core/txpool: fix zero tip tx always pending
This commit is contained in:
Daniel Liu 2025-03-25 12:18:26 +08:00 committed by GitHub
commit c2ad1b529b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -570,7 +570,7 @@ func (pool *TxPool) Pending(enforceTips bool) map[common.Address]types.Transacti
// If the miner requests tip enforcement, cap the lists now
if enforceTips && !pool.locals.contains(addr) {
for i, tx := range txs {
if !tx.IsSpecialTransaction() && tx.EffectiveGasTipIntCmp(pool.gasPrice, pool.priced.urgent.baseFee) < 0 {
if !tx.IsSpecialTransaction() && tx.GasPrice().Cmp(pool.priced.urgent.baseFee) < 0 {
txs = txs[:i]
break
}