diff options
Diffstat (limited to 'core/blockchain_test.go')
-rw-r--r-- | core/blockchain_test.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/blockchain_test.go b/core/blockchain_test.go index a7d3ea56e..310751cca 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -472,11 +472,16 @@ func makeBlockChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.B func chm(genesis *types.Block, db ethdb.Database) *BlockChain { var eventMux event.TypeMux - bc := &BlockChain{chainDb: db, genesisBlock: genesis, eventMux: &eventMux, pow: FakePow{}, rand: rand.New(rand.NewSource(0))} - bc.headerCache, _ = lru.New(100) + bc := &BlockChain{ + chainDb: db, + genesisBlock: genesis, + eventMux: &eventMux, + pow: FakePow{}, + } + valFn := func() HeaderValidator { return bc.Validator() } + bc.hc, _ = NewHeaderChain(db, valFn, bc.getProcInterrupt) bc.bodyCache, _ = lru.New(100) bc.bodyRLPCache, _ = lru.New(100) - bc.tdCache, _ = lru.New(100) bc.blockCache, _ = lru.New(100) bc.futureBlocks, _ = lru.New(100) bc.SetValidator(bproc{}) |