Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jwasinger committed Jul 11, 2022
1 parent 5705985 commit b2aa96b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion cmd/geth/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ It expects the genesis file as argument.`,
Usage: "Dumps genesis block JSON configuration to stdout",
ArgsUsage: "",
Flags: append([]cli.Flag{utils.DataDirFlag}, utils.NetworkFlags...),
Category: "BLOCKCHAIN COMMANDS",
Description: `
The dumpgenesis command prints the genesis configuration of the network preset
if one is set. Otherwise it prints the genesis from the datadir.`,
Expand Down
12 changes: 4 additions & 8 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -982,9 +982,7 @@ var (
KilnFlag,
}
// NetworkFlags is the flag group of all built-in supported networks.
NetworkFlags = append([]cli.Flag{
MainnetFlag,
}, TestnetFlags...)
NetworkFlags = append([]cli.Flag{MainnetFlag}, TestnetFlags...)

// DatabasePathFlags is the flag group of all database path flags.
DatabasePathFlags = []cli.Flag{
Expand Down Expand Up @@ -2135,14 +2133,12 @@ func MakeChainDatabase(ctx *cli.Context, stack *node.Node, readonly bool) ethdb.
}

func IsNetworkPreset(ctx *cli.Context) bool {
for _, flag := range TestnetFlags {
if ctx.Bool(flag.String()) {
for _, flag := range NetworkFlags {
bFlag, _ := flag.(*cli.BoolFlag)
if ctx.IsSet(bFlag.Name) {
return true
}
}
if ctx.Bool(MainnetFlag.Name) {
return true
}
return false
}

Expand Down

0 comments on commit b2aa96b

Please sign in to comment.