From e2292bfc3ead6caf068ead2461529ff90f8b0c31 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Tue, 4 Jul 2023 20:30:32 +0530 Subject: [PATCH] fix : TestTxIndexer --- core/blockchain_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 98697c79f8..09d15e1150 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -4389,10 +4389,12 @@ func TestTxIndexer(t *testing.T) { }, } + borReceipts := make([]types.Receipts, len(receipts)) + for _, c := range cases { frdir := t.TempDir() db, _ := rawdb.NewDatabaseWithFreezer(rawdb.NewMemoryDatabase(), frdir, "", false) - _, _ = rawdb.WriteAncientBlocks(db, append([]*types.Block{gspec.ToBlock()}, blocks...), append([]types.Receipts{{}}, receipts...), []types.Receipts{nil}, big.NewInt(0)) + _, _ = rawdb.WriteAncientBlocks(db, append([]*types.Block{gspec.ToBlock()}, blocks...), append([]types.Receipts{{}}, receipts...), append([]types.Receipts{{}}, borReceipts...), big.NewInt(0)) // Index the initial blocks from ancient store chain, _ := NewBlockChain(db, nil, gspec, nil, engine, vm.Config{}, nil, &c.limitA, nil)