diff options
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r-- | cmd/utils/flags.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 903c97e71..73bdb935a 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -114,6 +114,10 @@ var ( Usage: "Sets the genesis nonce", Value: 42, } + GenesisFileFlag = cli.StringFlag{ + Name: "genesis", + Usage: "Inserts/Overwrites the genesis block (json format)", + } IdentityFlag = cli.StringFlag{ Name: "identity", Usage: "Custom node name", @@ -378,6 +382,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { Name: common.MakeName(clientID, version), DataDir: ctx.GlobalString(DataDirFlag.Name), GenesisNonce: ctx.GlobalInt(GenesisNonceFlag.Name), + GenesisFile: ctx.GlobalString(GenesisFileFlag.Name), BlockChainVersion: ctx.GlobalInt(BlockchainVersionFlag.Name), SkipBcVersionCheck: false, NetworkId: ctx.GlobalInt(NetworkIdFlag.Name), @@ -434,8 +439,8 @@ func MakeChain(ctx *cli.Context) (chain *core.ChainManager, blockDB, stateDB, ex eventMux := new(event.TypeMux) pow := ethash.New() - genesis := core.GenesisBlock(uint64(ctx.GlobalInt(GenesisNonceFlag.Name)), blockDB) - chain, err = core.NewChainManager(genesis, blockDB, stateDB, extraDB, pow, eventMux) + //genesis := core.GenesisBlock(uint64(ctx.GlobalInt(GenesisNonceFlag.Name)), blockDB) + chain, err = core.NewChainManager(blockDB, stateDB, extraDB, pow, eventMux) if err != nil { Fatalf("Could not start chainmanager: %v", err) } |