Skip to content

Commit

Permalink
Revert "core/txpool/legacypool: handle missing head in reset (ethereu…
Browse files Browse the repository at this point in the history
…m#27479)"

This reverts commit e9686ce.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent c4dcfc6 commit 6063767
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions core/txpool/legacypool/legacypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1283,14 +1283,6 @@ func (pool *LegacyPool) reset(oldHead, newHead *types.Header) {
"old", oldHead.Hash(), "oldnum", oldNum, "new", newHead.Hash(), "newnum", newNum)
// We still need to update the current state s.th. the lost transactions can be readded by the user
} else {
if add == nil {
// if the new head is nil, it means that something happened between
// the firing of newhead-event and _now_: most likely a
// reorg caused by sync-reversion or explicit sethead back to an
// earlier block.
log.Warn("New head missing in txpool reset", "number", newHead.Number, "hash", newHead.Hash())
return
}
for rem.NumberU64() > add.NumberU64() {
discarded = append(discarded, rem.Transactions()...)
if rem = pool.chain.GetBlock(rem.ParentHash(), rem.NumberU64()-1); rem == nil {
Expand Down

0 comments on commit 6063767

Please sign in to comment.