From 07db098ccf94ebfa80a9dedea85b4f55ad6f8d76 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 20 Jun 2015 15:56:34 +0200 Subject: core: renamed next to pending & fixed tests --- core/chain_manager_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/chain_manager_test.go') diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index c37cd1a5e..70130c02c 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -18,6 +18,7 @@ import ( "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/pow" "github.com/ethereum/go-ethereum/rlp" + "github.com/hashicorp/golang-lru" ) func init() { @@ -109,7 +110,8 @@ func testChain(chainB types.Blocks, bman *BlockProcessor) (*big.Int, error) { bman.bc.mu.Lock() { - bman.bc.write(block) + bman.bc.enqueueForWrite(block) + //bman.bc.write(block) } bman.bc.mu.Unlock() } @@ -391,7 +393,7 @@ func makeChainWithDiff(genesis *types.Block, d []int, seed byte) []*types.Block func chm(genesis *types.Block, db common.Database) *ChainManager { var eventMux event.TypeMux bc := &ChainManager{blockDb: db, stateDb: db, genesisBlock: genesis, eventMux: &eventMux, pow: FakePow{}} - bc.cache = NewBlockCache(100) + bc.cache, _ = lru.New(100) bc.futureBlocks = NewBlockCache(100) bc.processor = bproc{} bc.ResetWithGenesisBlock(genesis) -- cgit v1.2.3