From d3010f49bd7be9399e92404e19e35dd7cca397b1 Mon Sep 17 00:00:00 2001 From: Ferran Borreguero Date: Wed, 1 Dec 2021 16:08:13 +0100 Subject: [PATCH] Fix ancestor bor receipts (#249) --- core/blockchain.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 753ca4abb2..05108a9c6b 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1222,14 +1222,14 @@ func (bc *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain [ } // BOR: Retrieve all the bor receipts. - borReceipts := types.Receipts{} + borReceipts := []types.Receipts{} 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. 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 if err != nil { log.Error("Error importing chain data to ancients", "err", err)