aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_makers.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-07-10 20:29:40 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-10 23:37:41 +0800
commita32c51effda8682b292d04863aae7811f78abf7e (patch)
treed721822cc10c929d5a2def0865c366e085ef99be /core/chain_makers.go
parent5a810758dbe75dce9537d464ac0e5b5385b0e78f (diff)
downloadgo-tangerine-a32c51effda8682b292d04863aae7811f78abf7e.tar.gz
go-tangerine-a32c51effda8682b292d04863aae7811f78abf7e.tar.zst
go-tangerine-a32c51effda8682b292d04863aae7811f78abf7e.zip
cmd, core, eth, common: genesis preparation
Implemented the --genesis flag thru which we can set a custom genesis block, including the official Ethereum genesis block.
Diffstat (limited to 'core/chain_makers.go')
-rw-r--r--core/chain_makers.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/chain_makers.go b/core/chain_makers.go
index 501fe7a92..93f381e78 100644
--- a/core/chain_makers.go
+++ b/core/chain_makers.go
@@ -183,7 +183,9 @@ func makeHeader(parent *types.Block, state *state.StateDB) *types.Header {
// InsertChain on the result of makeChain.
func newCanonical(n int, db common.Database) (*BlockProcessor, error) {
evmux := &event.TypeMux{}
- chainman, _ := NewChainManager(GenesisBlock(0, db), db, db, db, FakePow{}, evmux)
+
+ WriteTestNetGenesisBlock(db, db, 0)
+ chainman, _ := NewChainManager(db, db, db, FakePow{}, evmux)
bman := NewBlockProcessor(db, db, FakePow{}, chainman, evmux)
bman.bc.SetProcessor(bman)
parent := bman.bc.CurrentBlock()