diff options
author | Bas van Kervel <basvankervel@gmail.com> | 2017-05-03 18:26:09 +0800 |
---|---|---|
committer | Bas van Kervel <basvankervel@gmail.com> | 2017-05-03 20:33:07 +0800 |
commit | 502a2bd69ffa1ff49a394740d904df64c85e3ade (patch) | |
tree | bbe54706f84a727a890e4a633c1b07dc8b5efee8 /cmd/geth/main.go | |
parent | 8b517d7f00f5334a92b8796e11f4c4f71d884cbd (diff) | |
download | go-tangerine-502a2bd69ffa1ff49a394740d904df64c85e3ade.tar go-tangerine-502a2bd69ffa1ff49a394740d904df64c85e3ade.tar.gz go-tangerine-502a2bd69ffa1ff49a394740d904df64c85e3ade.tar.bz2 go-tangerine-502a2bd69ffa1ff49a394740d904df64c85e3ade.tar.lz go-tangerine-502a2bd69ffa1ff49a394740d904df64c85e3ade.tar.xz go-tangerine-502a2bd69ffa1ff49a394740d904df64c85e3ade.tar.zst go-tangerine-502a2bd69ffa1ff49a394740d904df64c85e3ade.zip |
cmd/geth: reorganise console/attach commands/flags
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r-- | cmd/geth/main.go | 98 |
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 { |