Skip to content

Commit 0a4e18f

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

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

core/txpool/legacypool/legacypool.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,10 +1302,13 @@ func (pool *LegacyPool) runReorg(done chan struct{}, reset *txpoolResetRequest,
13021302
// remove any transaction that has been included in the block or was invalidated
13031303
// because of another transaction (e.g. higher gas price).
13041304
if reset != nil {
1305-
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)
1305+
if reset.newHead != nil {
1306+
if 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)
1309+
} else {
1310+
pool.priced.Reheap()
1311+
}
13091312
}
13101313
// Update all accounts to the latest known pending nonce
13111314
nonces := make(map[common.Address]uint64, len(pool.pending))

0 commit comments

Comments
 (0)