mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/geth: fix empty genesis for default net
Seems weird that MakeGenesis method doesn't return DefaultMainnet...
This commit is contained in:
parent
a2a006928e
commit
ffbea7ddee
1 changed files with 3 additions and 0 deletions
|
|
@ -244,6 +244,9 @@ func initGenesis(ctx *cli.Context) error {
|
||||||
|
|
||||||
func dumpGenesis(ctx *cli.Context) error {
|
func dumpGenesis(ctx *cli.Context) error {
|
||||||
genesis := utils.MakeGenesis(ctx)
|
genesis := utils.MakeGenesis(ctx)
|
||||||
|
if genesis == nil {
|
||||||
|
genesis = core.DefaultGenesisBlock()
|
||||||
|
}
|
||||||
if err := json.NewEncoder(os.Stdout).Encode(genesis); err != nil {
|
if err := json.NewEncoder(os.Stdout).Encode(genesis); err != nil {
|
||||||
utils.Fatalf("could not encode defaulty genesis")
|
utils.Fatalf("could not encode defaulty genesis")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue