core/txpool/legacypool: revert the changes in the txpool clearing

This commit is contained in:
Gary Rong 2026-04-28 20:16:04 +08:00
parent 184bef1ec3
commit ebf209036e

View file

@ -1222,9 +1222,9 @@ func (pool *LegacyPool) runReorg(done chan struct{}, reset *txpoolResetRequest,
pool.mu.Lock() pool.mu.Lock()
if reset != nil { if reset != nil {
if reset.newHead != nil && reset.oldHead != nil { if reset.newHead != nil && reset.oldHead != nil {
// Discard the transactions with the gas limit higher than the cap. // Discard the transactions with the gas limit higher than the cap at the
// Osaka fork boundary.
if pool.chainconfig.IsOsaka(reset.newHead.Number, reset.newHead.Time) && if pool.chainconfig.IsOsaka(reset.newHead.Number, reset.newHead.Time) &&
!pool.chainconfig.IsAmsterdam(reset.newHead.Number, reset.newHead.Time) &&
!pool.chainconfig.IsOsaka(reset.oldHead.Number, reset.oldHead.Time) { !pool.chainconfig.IsOsaka(reset.oldHead.Number, reset.oldHead.Time) {
var hashes []common.Hash var hashes []common.Hash
pool.all.Range(func(hash common.Hash, tx *types.Transaction) bool { pool.all.Range(func(hash common.Hash, tx *types.Transaction) bool {