Skip to content

Commit

Permalink
Merge pull request ethereum#28 from lochjin/v1.12.0-qng
Browse files Browse the repository at this point in the history
txpool:reheap the priced list if london fork not enabled
  • Loading branch information
dindinw committed Jun 16, 2023
2 parents 3ddc148 + 2d5644b commit 9e83ad1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1277,9 +1277,13 @@ func (pool *TxPool) runReorg(done chan struct{}, reset *txpoolResetRequest, dirt
// because of another transaction (e.g. higher gas price).
if reset != nil {
pool.demoteUnexecutables()
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)
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()
}
}
// Update all accounts to the latest known pending nonce
nonces := make(map[common.Address]uint64, len(pool.pending))
Expand Down

0 comments on commit 9e83ad1

Please sign in to comment.