From 7701625e9cc072ad3338e9fdc940e2eec3eeb577 Mon Sep 17 00:00:00 2001 From: Kenji Siu Date: Thu, 3 Nov 2016 12:27:53 +0800 Subject: [PATCH 1/4] cmd/geth: improve command help messages --- cmd/geth/accountcmd.go | 91 +++++++++++++++++++++++------------------- cmd/geth/chaincmd.go | 51 +++++++++++++++-------- cmd/geth/consolecmd.go | 26 +++++++----- cmd/geth/main.go | 43 +++++++++++--------- cmd/geth/monitorcmd.go | 8 ++-- 5 files changed, 132 insertions(+), 87 deletions(-) diff --git a/cmd/geth/accountcmd.go b/cmd/geth/accountcmd.go index 2d70dcc2c9..237af99eb5 100644 --- a/cmd/geth/accountcmd.go +++ b/cmd/geth/accountcmd.go @@ -31,30 +31,37 @@ import ( var ( walletCommand = cli.Command{ - Name: "wallet", - Usage: "ethereum presale wallet", - Subcommands: []cli.Command{ - { - Action: importWallet, - Name: "import", - Usage: "import ethereum presale wallet", - }, - }, + Name: "wallet", + Usage: "Manage Ethereum presale wallets", + ArgsUsage: "", + Category: "ACCOUNT COMMANDS", Description: ` - - get wallet import /path/to/my/presale.wallet + geth wallet import /path/to/my/presale.wallet will prompt for your password and imports your ether presale account. It can be used non-interactively with the --password option taking a passwordfile as argument containing the wallet password in plaintext. -`} +`, + Subcommands: []cli.Command{ + { + Action: importWallet, + Name: "import", + Usage: "Import Ethereum presale wallet", + ArgsUsage: "", + Description: ` +TODO: Please write this +`, + }, + }, + } accountCommand = cli.Command{ - Action: accountList, - Name: "account", - Usage: "manage accounts", + Action: accountList, + Name: "account", + Usage: "Manage accounts", + ArgsUsage: "", + Category: "ACCOUNT COMMANDS", Description: ` - Manage accounts lets you create new accounts, list all existing accounts, import a private key into a new account. @@ -86,17 +93,21 @@ And finally. DO NOT FORGET YOUR PASSWORD. `, Subcommands: []cli.Command{ { - Action: accountList, - Name: "list", - Usage: "print account addresses", + Action: accountList, + Name: "list", + Usage: "Print account addresses", + ArgsUsage: " ", + Description: ` +TODO: Please write this +`, }, { - Action: accountCreate, - Name: "new", - Usage: "create a new account", + Action: accountCreate, + Name: "new", + Usage: "Create a new account", + ArgsUsage: " ", Description: ` - - ethereum account new + geth account new Creates a new account. Prints the address. @@ -106,19 +117,19 @@ You must remember this passphrase to unlock your account in the future. For non-interactive use the passphrase can be specified with the --password flag: - ethereum --password account new + geth --password account new Note, this is meant to be used for testing only, it is a bad idea to save your password to file or expose in any other way. - `, +`, }, { - Action: accountUpdate, - Name: "update", - Usage: "update an existing account", + Action: accountUpdate, + Name: "update", + Usage: "Update an existing account", + ArgsUsage: "
", Description: ` - - ethereum account update
+ geth account update
Update an existing account. @@ -130,19 +141,19 @@ format to the newest format or change the password for an account. For non-interactive use the passphrase can be specified with the --password flag: - ethereum --password account update
+ geth --password account update
Since only one password can be given, only format update can be performed, changing your password is only possible interactively. - `, +`, }, { - Action: accountImport, - Name: "import", - Usage: "import a private key into a new account", + Action: accountImport, + Name: "import", + Usage: "Import a private key into a new account", + ArgsUsage: "", Description: ` - - ethereum account import + geth account import Imports an unencrypted private key from and creates a new account. Prints the address. @@ -155,13 +166,13 @@ You must remember this passphrase to unlock your account in the future. For non-interactive use the passphrase can be specified with the -password flag: - ethereum --password account import + geth --password account import Note: As you can directly copy your encrypted accounts to another ethereum instance, this import mechanism is not needed when you transfer an account between nodes. - `, +`, }, }, } diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index c1bbbd8dcf..43dfd7e9be 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -40,35 +40,54 @@ import ( var ( importCommand = cli.Command{ - Action: importChain, - Name: "import", - Usage: `import a blockchain file`, + Action: importChain, + Name: "import", + Usage: "Import a blockchain file", + ArgsUsage: "", + Category: "BLOCKCHAIN COMMANDS", + Description: ` +TODO: Please write this +`, } exportCommand = cli.Command{ - Action: exportChain, - Name: "export", - Usage: `export blockchain into file`, + Action: exportChain, + Name: "export", + Usage: "Export blockchain into file", + ArgsUsage: " [ ]", + Category: "BLOCKCHAIN COMMANDS", Description: ` Requires a first argument of the file to write to. Optional second and third arguments control the first and last block to write. In this mode, the file will be appended if already existing. - `, +`, } upgradedbCommand = cli.Command{ - Action: upgradeDB, - Name: "upgradedb", - Usage: "upgrade chainblock database", + Action: upgradeDB, + Name: "upgradedb", + Usage: "Upgrade chainblock database", + ArgsUsage: " ", + Category: "BLOCKCHAIN COMMANDS", + Description: ` +TODO: Please write this +`, } removedbCommand = cli.Command{ - Action: removeDB, - Name: "removedb", - Usage: "Remove blockchain and state databases", + Action: removeDB, + Name: "removedb", + Usage: "Remove blockchain and state databases", + ArgsUsage: " ", + Category: "BLOCKCHAIN COMMANDS", + Description: ` +TODO: Please write this +`, } dumpCommand = cli.Command{ - Action: dump, - Name: "dump", - Usage: `dump a specific block from storage`, + Action: dump, + Name: "dump", + Usage: "Dump a specific block from storage", + ArgsUsage: "[ | ]...", + Category: "BLOCKCHAIN COMMANDS", Description: ` The arguments are interpreted as block numbers or hashes. Use "ethereum dump 0" to dump the genesis block. diff --git a/cmd/geth/consolecmd.go b/cmd/geth/consolecmd.go index 0662473037..b1c435e00f 100644 --- a/cmd/geth/consolecmd.go +++ b/cmd/geth/consolecmd.go @@ -30,9 +30,11 @@ import ( var ( consoleCommand = cli.Command{ - Action: localConsole, - Name: "console", - Usage: `Geth Console: interactive JavaScript environment`, + Action: localConsole, + Name: "console", + Usage: "Start an interactive JavaScript environment", + ArgsUsage: "", // TODO: Write this! + Category: "CONSOLE COMMANDS", Description: ` The Geth console is an interactive shell for the JavaScript runtime environment which exposes a node admin interface as well as the Ðapp JavaScript API. @@ -40,20 +42,24 @@ See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Console `, } attachCommand = cli.Command{ - Action: remoteConsole, - Name: "attach", - Usage: `Geth Console: interactive JavaScript environment (connect to node)`, + Action: remoteConsole, + Name: "attach", + Usage: "Start an interactive JavaScript environment (connect to node)", + ArgsUsage: "", // TODO: Write this! + Category: "CONSOLE COMMANDS", Description: ` The Geth console is an interactive shell for the JavaScript runtime environment which exposes a node admin interface as well as the Ðapp JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Console. This command allows to open a console on a running geth node. - `, +`, } javascriptCommand = cli.Command{ - Action: ephemeralConsole, - Name: "js", - Usage: `executes the given JavaScript files in the Geth JavaScript VM`, + Action: ephemeralConsole, + Name: "js", + Usage: "Execute the specified JavaScript files", + ArgsUsage: "", // TODO: Write this! + Category: "CONSOLE COMMANDS", Description: ` The JavaScript VM exposes a node admin interface as well as the Ðapp JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Console diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 5517052084..c525ba4339 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -61,6 +61,7 @@ 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-2016 The go-ethereum Authors" app.Commands = []cli.Command{ importCommand, exportCommand, @@ -74,9 +75,11 @@ func init() { attachCommand, javascriptCommand, { - Action: makedag, - Name: "makedag", - Usage: "generate ethash dag (for testing)", + Action: makedag, + Name: "makedag", + Usage: "Generate ethash DAG (for testing)", + ArgsUsage: " ", + Category: "MISCELLANEOUS COMMANDS", Description: ` The makedag command generates an ethash DAG in /tmp/dag. @@ -85,27 +88,33 @@ Regular users do not need to execute it. `, }, { - Action: version, - Name: "version", - Usage: "print ethereum version numbers", + Action: version, + Name: "version", + Usage: "Print version numbers", + ArgsUsage: " ", + Category: "MISCELLANEOUS COMMANDS", Description: ` The output of this command is supposed to be machine-readable. `, }, { - Action: initGenesis, - Name: "init", - Usage: "bootstraps and initialises a new genesis block (JSON)", + Action: initGenesis, + Name: "init", + Usage: "Bootstrap and initialize a new genesis block", + ArgsUsage: "", + Category: "BLOCKCHAIN COMMANDS", Description: ` -The init command initialises a new genesis block and definition for the network. +The init command initializes a new genesis block and definition for the network. This is a destructive action and changes the network in which you will be participating. `, }, { - Action: license, - Name: "license", - Usage: "displays geth's license information", + Action: license, + Name: "license", + Usage: "Display license information", + ArgsUsage: " ", + Category: "MISCELLANEOUS COMMANDS", }, } @@ -331,23 +340,22 @@ func makedag(ctx *cli.Context) error { return nil } -func version(c *cli.Context) error { +func version(ctx *cli.Context) error { fmt.Println(strings.Title(clientIdentifier)) fmt.Println("Version:", utils.Version) if gitCommit != "" { fmt.Println("Git Commit:", gitCommit) } fmt.Println("Protocol Versions:", eth.ProtocolVersions) - fmt.Println("Network Id:", c.GlobalInt(utils.NetworkIdFlag.Name)) + fmt.Println("Network Id:", ctx.GlobalInt(utils.NetworkIdFlag.Name)) fmt.Println("Go Version:", runtime.Version()) fmt.Println("OS:", runtime.GOOS) fmt.Printf("GOPATH=%s\n", os.Getenv("GOPATH")) fmt.Printf("GOROOT=%s\n", runtime.GOROOT()) - return nil } -func license(c *cli.Context) error { +func license(_ *cli.Context) error { fmt.Println(`Geth is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or @@ -361,6 +369,5 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with geth. If not, see . `) - return nil } diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go index b74315dabc..03a1244945 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/geth/monitorcmd.go @@ -49,9 +49,11 @@ var ( Usage: "Refresh interval in seconds", } monitorCommand = cli.Command{ - Action: monitor, - Name: "monitor", - Usage: `Geth Monitor: node metrics monitoring and visualization`, + Action: monitor, + Name: "monitor", + Usage: "Monitor and visualize node metrics", + ArgsUsage: " ", + Category: "MONITOR COMMANDS", Description: ` The Geth monitor is a tool to collect and visualize various internal metrics gathered by the node, supporting different chart types as well as the capacity From cca6deead80c11fe0d34ab6ec9a3e2059c594eb4 Mon Sep 17 00:00:00 2001 From: Kenji Siu Date: Fri, 11 Nov 2016 17:37:47 +0800 Subject: [PATCH 2/4] cmd/geth: tidied up the source --- cmd/geth/chaincmd.go | 43 ++++++++++++- cmd/geth/main.go | 145 ++----------------------------------------- cmd/geth/misccmd.go | 127 +++++++++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+), 141 deletions(-) create mode 100644 cmd/geth/misccmd.go diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index 19e723bfa2..01d4299926 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -1,4 +1,4 @@ -// Copyright 2015 The go-ethereum Authors +// Copyright 2013-2016 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify @@ -32,6 +32,7 @@ import ( "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethdb" + "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/trie" "github.com/syndtr/goleveldb/leveldb/util" @@ -39,6 +40,18 @@ import ( ) var ( + initCommand = cli.Command{ + Action: initGenesis, + Name: "init", + Usage: "Bootstrap and initialize a new genesis block", + ArgsUsage: "", + Category: "BLOCKCHAIN COMMANDS", + Description: ` +The init command initializes a new genesis block and definition for the network. +This is a destructive action and changes the network in which you will be +participating. +`, + } importCommand = cli.Command{ Action: importChain, Name: "import", @@ -95,6 +108,34 @@ Use "ethereum dump 0" to dump the genesis block. } ) +// initGenesis will initialise the given JSON format genesis file and writes it as +// the zero'd block (i.e. genesis) or will fail hard if it can't succeed. +func initGenesis(ctx *cli.Context) error { + genesisPath := ctx.Args().First() + if len(genesisPath) == 0 { + utils.Fatalf("must supply path to genesis JSON file") + } + + if ctx.GlobalBool(utils.TestNetFlag.Name) { + state.StartingNonce = 1048576 // (2**20) + } + + stack := makeFullNode(ctx) + chaindb := utils.MakeChainDatabase(ctx, stack) + + genesisFile, err := os.Open(genesisPath) + if err != nil { + utils.Fatalf("failed to read genesis file: %v", err) + } + + block, err := core.WriteGenesisBlock(chaindb, genesisFile) + if err != nil { + utils.Fatalf("failed to write genesis block: %v", err) + } + glog.V(logger.Info).Infof("successfully wrote genesis block and/or chain rule set: %x", block.Hash()) + return nil +} + func importChain(ctx *cli.Context) error { if len(ctx.Args()) != 1 { utils.Fatalf("This command requires an argument.") diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 0eab77f7eb..32524169c8 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -1,4 +1,4 @@ -// Copyright 2014 The go-ethereum Authors +// Copyright 2013-2016 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify @@ -20,25 +20,18 @@ package main import ( "encoding/hex" "fmt" - "io/ioutil" "os" - "path/filepath" "runtime" - "strconv" "strings" "time" - "github.com/ethereum/ethash" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/console" "github.com/ethereum/go-ethereum/contracts/release" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/internal/debug" "github.com/ethereum/go-ethereum/logger" - "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/node" "gopkg.in/urfave/cli.v1" @@ -63,6 +56,7 @@ func init() { app.HideVersion = true // we have a command to print the version app.Copyright = "Copyright 2013-2016 The go-ethereum Authors" app.Commands = []cli.Command{ + initCommand, importCommand, exportCommand, upgradedbCommand, @@ -74,48 +68,9 @@ func init() { consoleCommand, attachCommand, javascriptCommand, - { - Action: makedag, - Name: "makedag", - Usage: "Generate ethash DAG (for testing)", - ArgsUsage: " ", - Category: "MISCELLANEOUS COMMANDS", - Description: ` -The makedag command generates an ethash DAG in /tmp/dag. - -This command exists to support the system testing project. -Regular users do not need to execute it. -`, - }, - { - Action: version, - Name: "version", - Usage: "Print version numbers", - ArgsUsage: " ", - Category: "MISCELLANEOUS COMMANDS", - Description: ` -The output of this command is supposed to be machine-readable. -`, - }, - { - Action: initGenesis, - Name: "init", - Usage: "Bootstrap and initialize a new genesis block", - ArgsUsage: "", - Category: "BLOCKCHAIN COMMANDS", - Description: ` -The init command initializes a new genesis block and definition for the network. -This is a destructive action and changes the network in which you will be -participating. -`, - }, - { - Action: license, - Name: "license", - Usage: "Display license information", - ArgsUsage: " ", - Category: "MISCELLANEOUS COMMANDS", - }, + makedagCommand, + versionCommand, + licenseCommand, } app.Flags = []cli.Flag{ @@ -229,34 +184,6 @@ func geth(ctx *cli.Context) error { return nil } -// initGenesis will initialise the given JSON format genesis file and writes it as -// the zero'd block (i.e. genesis) or will fail hard if it can't succeed. -func initGenesis(ctx *cli.Context) error { - genesisPath := ctx.Args().First() - if len(genesisPath) == 0 { - utils.Fatalf("must supply path to genesis JSON file") - } - - if ctx.GlobalBool(utils.TestNetFlag.Name) { - state.StartingNonce = 1048576 // (2**20) - } - - stack := makeFullNode(ctx) - chaindb := utils.MakeChainDatabase(ctx, stack) - - genesisFile, err := os.Open(genesisPath) - if err != nil { - utils.Fatalf("failed to read genesis file: %v", err) - } - - block, err := core.WriteGenesisBlock(chaindb, genesisFile) - if err != nil { - utils.Fatalf("failed to write genesis block: %v", err) - } - glog.V(logger.Info).Infof("successfully wrote genesis block and/or chain rule set: %x", block.Hash()) - return nil -} - func makeFullNode(ctx *cli.Context) *node.Node { stack := utils.MakeNode(ctx, clientIdentifier, gitCommit) utils.RegisterEthService(ctx, stack, utils.MakeDefaultExtraData(clientIdentifier)) @@ -313,65 +240,3 @@ func startNode(ctx *cli.Context, stack *node.Node) { } } } - -func makedag(ctx *cli.Context) error { - args := ctx.Args() - wrongArgs := func() { - utils.Fatalf(`Usage: geth makedag `) - } - switch { - case len(args) == 2: - blockNum, err := strconv.ParseUint(args[0], 0, 64) - dir := args[1] - if err != nil { - wrongArgs() - } else { - dir = filepath.Clean(dir) - // seems to require a trailing slash - if !strings.HasSuffix(dir, "/") { - dir = dir + "/" - } - _, err = ioutil.ReadDir(dir) - if err != nil { - utils.Fatalf("Can't find dir") - } - fmt.Println("making DAG, this could take awhile...") - ethash.MakeDAG(blockNum, dir) - } - default: - wrongArgs() - } - return nil -} - -func version(ctx *cli.Context) error { - fmt.Println(strings.Title(clientIdentifier)) - fmt.Println("Version:", utils.Version) - if gitCommit != "" { - fmt.Println("Git Commit:", gitCommit) - } - fmt.Println("Protocol Versions:", eth.ProtocolVersions) - fmt.Println("Network Id:", ctx.GlobalInt(utils.NetworkIdFlag.Name)) - fmt.Println("Go Version:", runtime.Version()) - fmt.Println("OS:", runtime.GOOS) - fmt.Printf("GOPATH=%s\n", os.Getenv("GOPATH")) - fmt.Printf("GOROOT=%s\n", runtime.GOROOT()) - return nil -} - -func license(_ *cli.Context) error { - fmt.Println(`Geth is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -Geth is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with geth. If not, see . -`) - return nil -} diff --git a/cmd/geth/misccmd.go b/cmd/geth/misccmd.go new file mode 100644 index 0000000000..72e64a8b1b --- /dev/null +++ b/cmd/geth/misccmd.go @@ -0,0 +1,127 @@ +// Copyright 2013-2016 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with go-ethereum. If not, see . + +package main + +import ( + "fmt" + "io/ioutil" + "os" + "path/filepath" + "runtime" + "strconv" + "strings" + + "github.com/ethereum/ethash" + "github.com/ethereum/go-ethereum/cmd/utils" + "github.com/ethereum/go-ethereum/eth" + "gopkg.in/urfave/cli.v1" +) + +var ( + makedagCommand = cli.Command{ + Action: makedag, + Name: "makedag", + Usage: "Generate ethash DAG (for testing)", + ArgsUsage: " ", + Category: "MISCELLANEOUS COMMANDS", + Description: ` +The makedag command generates an ethash DAG in /tmp/dag. + +This command exists to support the system testing project. +Regular users do not need to execute it. +`, + } + versionCommand = cli.Command{ + Action: version, + Name: "version", + Usage: "Print version numbers", + ArgsUsage: " ", + Category: "MISCELLANEOUS COMMANDS", + Description: ` +The output of this command is supposed to be machine-readable. +`, + } + licenseCommand = cli.Command{ + Action: license, + Name: "license", + Usage: "Display license information", + ArgsUsage: " ", + Category: "MISCELLANEOUS COMMANDS", + } +) + +func makedag(ctx *cli.Context) error { + args := ctx.Args() + wrongArgs := func() { + utils.Fatalf(`Usage: geth makedag `) + } + switch { + case len(args) == 2: + blockNum, err := strconv.ParseUint(args[0], 0, 64) + dir := args[1] + if err != nil { + wrongArgs() + } else { + dir = filepath.Clean(dir) + // seems to require a trailing slash + if !strings.HasSuffix(dir, "/") { + dir = dir + "/" + } + _, err = ioutil.ReadDir(dir) + if err != nil { + utils.Fatalf("Can't find dir") + } + fmt.Println("making DAG, this could take awhile...") + ethash.MakeDAG(blockNum, dir) + } + default: + wrongArgs() + } + return nil +} + +func version(ctx *cli.Context) error { + fmt.Println(strings.Title(clientIdentifier)) + fmt.Println("Version:", utils.Version) + if gitCommit != "" { + fmt.Println("Git Commit:", gitCommit) + } + fmt.Println("Protocol Versions:", eth.ProtocolVersions) + fmt.Println("Network Id:", ctx.GlobalInt(utils.NetworkIdFlag.Name)) + fmt.Println("Go Version:", runtime.Version()) + fmt.Println("OS:", runtime.GOOS) + fmt.Printf("GOPATH=%s\n", os.Getenv("GOPATH")) + fmt.Printf("GOROOT=%s\n", runtime.GOROOT()) + return nil +} + +func license(_ *cli.Context) error { + fmt.Println(`Geth is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Geth is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with geth. If not, see . +`) + return nil +} From 78ca74d19819a47b4160be35c0d6ced1c986d107 Mon Sep 17 00:00:00 2001 From: Kenji Siu Date: Fri, 11 Nov 2016 17:54:59 +0800 Subject: [PATCH 3/4] cmd/geth: tidied up the source --- cmd/geth/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 32524169c8..ca41a3410b 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -56,18 +56,23 @@ func init() { app.HideVersion = true // we have a command to print the version app.Copyright = "Copyright 2013-2016 The go-ethereum Authors" app.Commands = []cli.Command{ + // See chaincmd.go: initCommand, importCommand, exportCommand, upgradedbCommand, removedbCommand, dumpCommand, + // See monitorcmd.go: monitorCommand, + // See accountcmd.go: accountCommand, walletCommand, + // See consolecmd.go: consoleCommand, attachCommand, javascriptCommand, + // See misccmd.go: makedagCommand, versionCommand, licenseCommand, From b51d9d7623737030fdb073b1e32935526ec3a280 Mon Sep 17 00:00:00 2001 From: Kenji Siu Date: Fri, 11 Nov 2016 18:32:19 +0800 Subject: [PATCH 4/4] cmd/geth: tidied up the source --- cmd/geth/chaincmd.go | 2 +- cmd/geth/main.go | 2 +- cmd/geth/misccmd.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index 01d4299926..a116b5a6d0 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -1,4 +1,4 @@ -// Copyright 2013-2016 The go-ethereum Authors +// Copyright 2015 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify diff --git a/cmd/geth/main.go b/cmd/geth/main.go index ca41a3410b..b2a176a2b1 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -1,4 +1,4 @@ -// Copyright 2013-2016 The go-ethereum Authors +// Copyright 2014 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify diff --git a/cmd/geth/misccmd.go b/cmd/geth/misccmd.go index 72e64a8b1b..e0539bd1c8 100644 --- a/cmd/geth/misccmd.go +++ b/cmd/geth/misccmd.go @@ -1,4 +1,4 @@ -// Copyright 2013-2016 The go-ethereum Authors +// Copyright 2016 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify