core: renamed next to pending & fixed tests

This commit is contained in:
obscuren
2015-06-20 15:56:34 +02:00
committed by Jeffrey Wilcke
parent 855e76fddd
commit 07db098ccf
2 changed files with 14 additions and 17 deletions

View File

@ -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)