diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-10 20:29:40 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-10 23:37:41 +0800 |
commit | a32c51effda8682b292d04863aae7811f78abf7e (patch) | |
tree | d721822cc10c929d5a2def0865c366e085ef99be /core/chain_makers.go | |
parent | 5a810758dbe75dce9537d464ac0e5b5385b0e78f (diff) | |
download | dexon-a32c51effda8682b292d04863aae7811f78abf7e.tar.gz dexon-a32c51effda8682b292d04863aae7811f78abf7e.tar.zst dexon-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.go | 4 |
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() |