From c254b084436e8838016e7a1b97225f72c0f1cb66 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Thu, 7 Nov 2024 16:33:15 +0800 Subject: [PATCH] core/txpool: fix very high pending special transactions --- core/txpool/txpool.go | 2 +- core/types/transaction.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index 7b755747fa..fc57d9355a 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -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.EffectiveGasTipIntCmp(pool.gasPrice, pool.priced.urgent.baseFee) < 0 { + if !tx.IsSpecialTransaction() && tx.EffectiveGasTipIntCmp(pool.gasPrice, pool.priced.urgent.baseFee) < 0 { txs = txs[:i] break } diff --git a/core/types/transaction.go b/core/types/transaction.go index 95f5e3b8ac..f0afdca060 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -481,7 +481,7 @@ func (tx *Transaction) TxCost(number *big.Int) *big.Int { func (tx *Transaction) IsSpecialTransaction() bool { to := tx.To() - return to != nil && (*to == common.RandomizeSMCBinary || *to == common.BlockSignersBinary) + return to != nil && (*to == common.BlockSignersBinary || *to == common.RandomizeSMCBinary) } func (tx *Transaction) IsTradingTransaction() bool {