mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-14 16:03:45 +00:00
Fix ancient receipts
This commit is contained in:
parent
908cbbf632
commit
149f47e73d
1 changed files with 3 additions and 3 deletions
|
|
@ -1222,14 +1222,14 @@ func (bc *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain [
|
||||||
}
|
}
|
||||||
|
|
||||||
// BOR: Retrieve all the bor receipts.
|
// BOR: Retrieve all the bor receipts.
|
||||||
borReceipts := types.Receipts{}
|
borReceipts := []types.Receipts{}
|
||||||
for _, block := range blockChain {
|
for _, block := range blockChain {
|
||||||
borReceipts = append(borReceipts, bc.GetBorReceiptByHash(block.Hash()))
|
borReceipts = append(borReceipts, []*types.Receipt{bc.GetBorReceiptByHash(block.Hash())})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write all chain data to ancients.
|
// Write all chain data to ancients.
|
||||||
td := bc.GetTd(first.Hash(), first.NumberU64())
|
td := bc.GetTd(first.Hash(), first.NumberU64())
|
||||||
writeSize, err := rawdb.WriteAncientBlocks(bc.db, blockChain, receiptChain, []types.Receipts{borReceipts}, td)
|
writeSize, err := rawdb.WriteAncientBlocks(bc.db, blockChain, receiptChain, borReceipts, td)
|
||||||
size += writeSize
|
size += writeSize
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error importing chain data to ancients", "err", err)
|
log.Error("Error importing chain data to ancients", "err", err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue