Commit cc3ab77c authored by Matthew Slipper's avatar Matthew Slipper

op-wheel: Insert receipts

parent 31fb2b9a
...@@ -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