Commit 93cc6ceb authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4310 from ethereum-optimism/12-07-op-wheel_Insert_receipts

op-wheel: Insert receipts
parents 4d46f920 cc3ab77c
...@@ -124,6 +124,10 @@ func (ch *Cheater) RunAndClose(fn HeadFn) error { ...@@ -124,6 +124,10 @@ func (ch *Cheater) RunAndClose(fn HeadFn) error {
// using Clique consensus, which causes a panic. // using Clique consensus, which causes a panic.
rawdb.WriteTd(batch, blockHash, preBlock.NumberU64(), ch.Blockchain.GetTd(preBlock.Hash(), preBlock.NumberU64())) rawdb.WriteTd(batch, blockHash, preBlock.NumberU64(), ch.Blockchain.GetTd(preBlock.Hash(), preBlock.NumberU64()))
// Need to copy over receipts since they are keyed by block hash.
receipts := rawdb.ReadReceipts(ch.DB, preBlock.Hash(), preBlock.NumberU64(), ch.Blockchain.Config())
rawdb.WriteReceipts(batch, blockHash, preBlock.NumberU64(), receipts)
// Geth maintains an internal mapping between block bodies and their hashes. None of the database // Geth maintains an internal mapping between block bodies and their hashes. None of the database
// accessors above update this mapping, so we need to do it manually. // accessors above update this mapping, so we need to do it manually.
oldKey := blockBodyKey(preBlock.NumberU64(), preBlock.Hash()) oldKey := blockBodyKey(preBlock.NumberU64(), preBlock.Hash())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment