aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_makers.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-11-24 20:48:47 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-11-24 20:48:47 +0800
commit5490437942967638bcc6198035315f6811febaa8 (patch)
treeec4fbee454bacbf2b80b5a7ff402fb48dd2c10cf /core/chain_makers.go
parente5532154a50114d5ffb1ffd850b746cab00cb899 (diff)
parentb0fb48c389460193d9fc0a5118d79ff6dec48ce0 (diff)
downloadgo-tangerine-1.3.2.tar
go-tangerine-1.3.2.tar.gz
go-tangerine-1.3.2.tar.bz2
go-tangerine-1.3.2.tar.lz
go-tangerine-1.3.2.tar.xz
go-tangerine-1.3.2.tar.zst
go-tangerine-1.3.2.zip
Merge branch 'develop' into release/1.3.2v1.3.2
Conflicts: VERSION cmd/geth/main.go
Diffstat (limited to 'core/chain_makers.go')
-rw-r--r--core/chain_makers.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/core/chain_makers.go b/core/chain_makers.go
index 56e37a0fc..f1ada487f 100644
--- a/core/chain_makers.go
+++ b/core/chain_makers.go
@@ -214,7 +214,7 @@ func makeHeader(parent *types.Block, state *state.StateDB) *types.Header {
// newCanonical creates a chain database, and injects a deterministic canonical
// chain. Depending on the full flag, if creates either a full block chain or a
// header only chain.
-func newCanonical(n int, full bool) (ethdb.Database, *BlockProcessor, error) {
+func newCanonical(n int, full bool) (ethdb.Database, *BlockChain, error) {
// Create te new chain database
db, _ := ethdb.NewMemDatabase()
evmux := &event.TypeMux{}
@@ -223,23 +223,20 @@ func newCanonical(n int, full bool) (ethdb.Database, *BlockProcessor, error) {
genesis, _ := WriteTestNetGenesisBlock(db, 0)
blockchain, _ := NewBlockChain(db, FakePow{}, evmux)
- processor := NewBlockProcessor(db, FakePow{}, blockchain, evmux)
- processor.bc.SetProcessor(processor)
-
// Create and inject the requested chain
if n == 0 {
- return db, processor, nil
+ return db, blockchain, nil
}
if full {
// Full block-chain requested
blocks := makeBlockChain(genesis, n, db, canonicalSeed)
_, err := blockchain.InsertChain(blocks)
- return db, processor, err
+ return db, blockchain, err
}
// Header-only chain requested
headers := makeHeaderChain(genesis.Header(), n, db, canonicalSeed)
_, err := blockchain.InsertHeaderChain(headers, 1)
- return db, processor, err
+ return db, blockchain, err
}
// makeHeaderChain creates a deterministic chain of headers rooted at parent.