Skip to content

Commit cb2d604

Browse files
authored
Merge pull request #728 from gzliudan/fix-pend-tx
core/txpool: fix very high pending special transactions
2 parents afc4fcf + c254b08 commit cb2d604

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/txpool/txpool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ func (pool *TxPool) Pending(enforceTips bool) map[common.Address]types.Transacti
570570
// If the miner requests tip enforcement, cap the lists now
571571
if enforceTips && !pool.locals.contains(addr) {
572572
for i, tx := range txs {
573-
if tx.EffectiveGasTipIntCmp(pool.gasPrice, pool.priced.urgent.baseFee) < 0 {
573+
if !tx.IsSpecialTransaction() && tx.EffectiveGasTipIntCmp(pool.gasPrice, pool.priced.urgent.baseFee) < 0 {
574574
txs = txs[:i]
575575
break
576576
}

core/types/transaction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ func (tx *Transaction) TxCost(number *big.Int) *big.Int {
481481

482482
func (tx *Transaction) IsSpecialTransaction() bool {
483483
to := tx.To()
484-
return to != nil && (*to == common.RandomizeSMCBinary || *to == common.BlockSignersBinary)
484+
return to != nil && (*to == common.BlockSignersBinary || *to == common.RandomizeSMCBinary)
485485
}
486486

487487
func (tx *Transaction) IsTradingTransaction() bool {

0 commit comments

Comments
 (0)