Skip to content

Commit 7d74aff

Browse files
committed
core/txpool/legacypool: reheap the priced list if london fork not enabled ethereum#27481
1 parent 44771b7 commit 7d74aff

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

core/txpool/legacypool/legacypool.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,9 +1303,13 @@ func (pool *LegacyPool) runReorg(done chan struct{}, reset *txpoolResetRequest,
13031303
// because of another transaction (e.g. higher gas price).
13041304
if reset != nil {
13051305
pool.demoteUnexecutables()
1306-
if reset.newHead != nil && pool.chainconfig.IsEIP1559(new(big.Int).Add(reset.newHead.Number, big.NewInt(1))) {
1307-
pendingBaseFee := eip1559.CalcBaseFee(pool.chainconfig, reset.newHead)
1308-
pool.priced.SetBaseFee(pendingBaseFee)
1306+
if reset.newHead != nil {
1307+
if pool.chainconfig.IsEIP1559(new(big.Int).Add(reset.newHead.Number, big.NewInt(1))) {
1308+
pendingBaseFee := eip1559.CalcBaseFee(pool.chainconfig, reset.newHead)
1309+
pool.priced.SetBaseFee(pendingBaseFee)
1310+
} else {
1311+
pool.priced.Reheap()
1312+
}
13091313
}
13101314
// Update all accounts to the latest known pending nonce
13111315
nonces := make(map[common.Address]uint64, len(pool.pending))

0 commit comments

Comments
 (0)