Skip to content

Commit

Permalink
core/txpool/legacypool/legacypool.go: add gasTip check when reset (#2918
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zlacfzy authored Feb 25, 2025
1 parent 71e0024 commit c266001
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/txpool/legacypool/legacypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1423,8 +1423,9 @@ func (pool *LegacyPool) reset(oldHead, newHead *types.Header) {
}
}
lost := make([]*types.Transaction, 0, len(discarded))
gasTip := pool.gasTip.Load().ToBig()
for _, tx := range types.TxDifference(discarded, included) {
if pool.Filter(tx) {
if pool.Filter(tx) && tx.GasTipCapIntCmp(gasTip) >= 0 {
lost = append(lost, tx)
}
}
Expand Down

0 comments on commit c266001

Please sign in to comment.