mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "core/txpool/legacypool: handle missing head in reset (#27479)"
This reverts commit e9686cee73.
This commit is contained in:
parent
3e40df2156
commit
bf8ddb7faf
1 changed files with 0 additions and 8 deletions
|
|
@ -1283,14 +1283,6 @@ func (pool *LegacyPool) reset(oldHead, newHead *types.Header) {
|
||||||
"old", oldHead.Hash(), "oldnum", oldNum, "new", newHead.Hash(), "newnum", newNum)
|
"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
|
// We still need to update the current state s.th. the lost transactions can be readded by the user
|
||||||
} else {
|
} 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() {
|
for rem.NumberU64() > add.NumberU64() {
|
||||||
discarded = append(discarded, rem.Transactions()...)
|
discarded = append(discarded, rem.Transactions()...)
|
||||||
if rem = pool.chain.GetBlock(rem.ParentHash(), rem.NumberU64()-1); rem == nil {
|
if rem = pool.chain.GetBlock(rem.ParentHash(), rem.NumberU64()-1); rem == nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue