Skip to content

Commit

Permalink
revert a underprice check in txpool (#987)
Browse files Browse the repository at this point in the history
revert underprice check in txpool
  • Loading branch information
0xmountaintop authored Aug 15, 2024
1 parent 1d33157 commit f883ca8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/txpool/legacypool/legacypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,8 @@ func (pool *LegacyPool) add(tx *types.Transaction, local bool) (replaced bool, e
// If the transaction pool is full, discard underpriced transactions
if uint64(pool.all.Slots()+numSlots(tx)) > pool.config.GlobalSlots+pool.config.GlobalQueue {
// If the new transaction is underpriced, don't accept it
// if !isLocal && pool.priced.Underpriced(tx) {
if !isLocal && tx.GasFeeCapIntCmp(pool.gasTip.Load()) < 0 {
log.Trace("Discarding underpriced transaction", "hash", hash, "gasTipCap", tx.GasTipCap(), "gasFeeCap", tx.GasFeeCap(), "txPoolGasTip", pool.gasTip.Load())
if !isLocal && pool.priced.Underpriced(tx) {
log.Trace("Discarding underpriced transaction", "hash", hash, "gasTipCap", tx.GasTipCap(), "gasFeeCap", tx.GasFeeCap())
underpricedTxMeter.Mark(1)
return false, txpool.ErrUnderpriced
}
Expand Down

0 comments on commit f883ca8

Please sign in to comment.