core/txpool: fix very high pending special transactions

This commit is contained in:
Daniel Liu 2024-11-07 16:33:15 +08:00
parent afc4fcf8f5
commit c254b08443
2 changed files with 2 additions and 2 deletions

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.EffectiveGasTipIntCmp(pool.gasPrice, pool.priced.urgent.baseFee) < 0 {
if !tx.IsSpecialTransaction() && tx.EffectiveGasTipIntCmp(pool.gasPrice, pool.priced.urgent.baseFee) < 0 {
txs = txs[:i]
break
}

View file

@ -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 {