diff options
author | Felix Lange <fjl@twurst.com> | 2015-06-19 07:57:16 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-06-30 00:51:47 +0800 |
commit | ceaf1c080b4047c26d433e778d4d3142f4e29d24 (patch) | |
tree | 5f1f5b8cfad997ac3be2070e7a6a0c9876d8d5d9 /core/chain_manager_test.go | |
parent | 1d42888d3047dabfb352c94a2051e7af14d2a509 (diff) | |
download | dexon-ceaf1c080b4047c26d433e778d4d3142f4e29d24.tar dexon-ceaf1c080b4047c26d433e778d4d3142f4e29d24.tar.gz dexon-ceaf1c080b4047c26d433e778d4d3142f4e29d24.tar.bz2 dexon-ceaf1c080b4047c26d433e778d4d3142f4e29d24.tar.lz dexon-ceaf1c080b4047c26d433e778d4d3142f4e29d24.tar.xz dexon-ceaf1c080b4047c26d433e778d4d3142f4e29d24.tar.zst dexon-ceaf1c080b4047c26d433e778d4d3142f4e29d24.zip |
core: add GenerateChain, GenesisBlockForTesting
Diffstat (limited to 'core/chain_manager_test.go')
-rw-r--r-- | core/chain_manager_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go index afec1d0f1..c37cd1a5e 100644 --- a/core/chain_manager_test.go +++ b/core/chain_manager_test.go @@ -67,7 +67,7 @@ func testFork(t *testing.T, bman *BlockProcessor, i, N int, f func(td1, td2 *big // extend the fork parent := bman2.bc.CurrentBlock() - chainB := makeChain(bman2, parent, N, db, ForkSeed) + chainB := makeChain(parent, N, db, forkSeed) _, err = bman2.bc.InsertChain(chainB) if err != nil { t.Fatal("Insert chain error for fork:", err) @@ -256,7 +256,7 @@ func TestBrokenChain(t *testing.T) { } bman2.bc.SetProcessor(bman2) parent := bman2.bc.CurrentBlock() - chainB := makeChain(bman2, parent, 5, db2, ForkSeed) + chainB := makeChain(parent, 5, db2, forkSeed) chainB = chainB[1:] _, err = testChain(chainB, bman) if err == nil { @@ -444,7 +444,7 @@ func TestInsertNonceError(t *testing.T) { genesis := GenesisBlock(0, db) bc := chm(genesis, db) bc.processor = NewBlockProcessor(db, db, bc.pow, bc, bc.eventMux) - blocks := makeChain(bc.processor.(*BlockProcessor), bc.currentBlock, i, db, 0) + blocks := makeChain(bc.currentBlock, i, db, 0) fail := rand.Int() % len(blocks) failblock := blocks[fail] |