aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r--cmd/geth/main.go98
1 files changed, 51 insertions, 47 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index ad7b639a3..457a70bf9 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -49,39 +49,8 @@ var (
relOracle = common.HexToAddress("0xfa7b9770ca4cb04296cac84f37736d4041251cdf")
// The app that holds all commands and flags.
app = utils.NewApp(gitCommit, "the go-ethereum command line interface")
-)
-
-func init() {
- // Initialize the CLI app and start Geth
- app.Action = geth
- app.HideVersion = true // we have a command to print the version
- app.Copyright = "Copyright 2013-2017 The go-ethereum Authors"
- app.Commands = []cli.Command{
- // See chaincmd.go:
- initCommand,
- importCommand,
- exportCommand,
- removedbCommand,
- dumpCommand,
- // See monitorcmd.go:
- monitorCommand,
- // See accountcmd.go:
- accountCommand,
- walletCommand,
- // See consolecmd.go:
- consoleCommand,
- attachCommand,
- javascriptCommand,
- // See misccmd.go:
- makedagCommand,
- versionCommand,
- bugCommand,
- licenseCommand,
- // See config.go
- dumpConfigCommand,
- }
-
- app.Flags = []cli.Flag{
+ // flags that configure the node
+ nodeFlags = []cli.Flag{
utils.IdentityFlag,
utils.UnlockedAccountFlag,
utils.PasswordFileFlag,
@@ -103,7 +72,6 @@ func init() {
utils.LightKDFFlag,
utils.CacheFlag,
utils.TrieCacheGenFlag,
- utils.JSpathFlag,
utils.ListenPortFlag,
utils.MaxPeersFlag,
utils.MaxPendingPeersFlag,
@@ -118,19 +86,6 @@ func init() {
utils.NetrestrictFlag,
utils.NodeKeyFileFlag,
utils.NodeKeyHexFlag,
- utils.RPCEnabledFlag,
- utils.RPCListenAddrFlag,
- utils.RPCPortFlag,
- utils.RPCApiFlag,
- utils.WSEnabledFlag,
- utils.WSListenAddrFlag,
- utils.WSPortFlag,
- utils.WSApiFlag,
- utils.WSAllowedOriginsFlag,
- utils.IPCDisabledFlag,
- utils.IPCPathFlag,
- utils.ExecFlag,
- utils.PreloadJSFlag,
utils.WhisperEnabledFlag,
utils.DevModeFlag,
utils.TestNetFlag,
@@ -146,6 +101,55 @@ func init() {
utils.ExtraDataFlag,
configFileFlag,
}
+
+ rpcFlags = []cli.Flag{
+ utils.RPCEnabledFlag,
+ utils.RPCListenAddrFlag,
+ utils.RPCPortFlag,
+ utils.RPCApiFlag,
+ utils.WSEnabledFlag,
+ utils.WSListenAddrFlag,
+ utils.WSPortFlag,
+ utils.WSApiFlag,
+ utils.WSAllowedOriginsFlag,
+ utils.IPCDisabledFlag,
+ utils.IPCPathFlag,
+ }
+)
+
+func init() {
+ // Initialize the CLI app and start Geth
+ app.Action = geth
+ app.HideVersion = true // we have a command to print the version
+ app.Copyright = "Copyright 2013-2017 The go-ethereum Authors"
+ app.Commands = []cli.Command{
+ // See chaincmd.go:
+ initCommand,
+ importCommand,
+ exportCommand,
+ removedbCommand,
+ dumpCommand,
+ // See monitorcmd.go:
+ monitorCommand,
+ // See accountcmd.go:
+ accountCommand,
+ walletCommand,
+ // See consolecmd.go:
+ consoleCommand,
+ attachCommand,
+ javascriptCommand,
+ // See misccmd.go:
+ makedagCommand,
+ versionCommand,
+ bugCommand,
+ licenseCommand,
+ // See config.go
+ dumpConfigCommand,
+ }
+
+ app.Flags = append(app.Flags, nodeFlags...)
+ app.Flags = append(app.Flags, rpcFlags...)
+ app.Flags = append(app.Flags, consoleFlags...)
app.Flags = append(app.Flags, debug.Flags...)
app.Before = func(ctx *cli.Context) error {