Skip to content

Commit

Permalink
Revert "core/txpool/legacypool: reheap the tx list if london fork not…
Browse files Browse the repository at this point in the history
… enabled (ethereum#27481)"

This reverts commit 0a44648.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent ad1288c commit 2b916a0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions core/txpool/legacypool/legacypool.go
Expand Up @@ -1206,13 +1206,9 @@ func (pool *LegacyPool) runReorg(done chan struct{}, reset *txpoolResetRequest,
// because of another transaction (e.g. higher gas price).
if reset != nil {
pool.demoteUnexecutables()
if reset.newHead != nil {
if pool.chainconfig.IsLondon(new(big.Int).Add(reset.newHead.Number, big.NewInt(1))) {
pendingBaseFee := misc.CalcBaseFee(pool.chainconfig, reset.newHead)
pool.priced.SetBaseFee(pendingBaseFee)
} else {
pool.priced.Reheap()
}
if reset.newHead != nil && pool.chainconfig.IsLondon(new(big.Int).Add(reset.newHead.Number, big.NewInt(1))) {
pendingBaseFee := misc.CalcBaseFee(pool.chainconfig, reset.newHead)
pool.priced.SetBaseFee(pendingBaseFee)
}
// Update all accounts to the latest known pending nonce
nonces := make(map[common.Address]uint64, len(pool.pending))
Expand Down

0 comments on commit 2b916a0

Please sign in to comment.