mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
core: delete access list when rewinding block chain
setHeadBeyondRoot already removes bodies and receipts from the KV store during rewind; also delete the block access list to avoid stale data after a chain reorg.
This commit is contained in:
parent
7aa7806c09
commit
c7d025aa36
1 changed files with 1 additions and 0 deletions
|
|
@ -1093,6 +1093,7 @@ func (bc *BlockChain) setHeadBeyondRoot(head uint64, time uint64, root common.Ha
|
||||||
// removed by the hc.SetHead function.
|
// removed by the hc.SetHead function.
|
||||||
rawdb.DeleteBody(db, hash, num)
|
rawdb.DeleteBody(db, hash, num)
|
||||||
rawdb.DeleteReceipts(db, hash, num)
|
rawdb.DeleteReceipts(db, hash, num)
|
||||||
|
rawdb.DeleteAccessList(db, hash, num)
|
||||||
}
|
}
|
||||||
// Todo(rjl493456442) txlookup, log index, etc
|
// Todo(rjl493456442) txlookup, log index, etc
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue