diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-19 01:42:21 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-19 01:42:21 +0800 |
commit | af9da83ce2c6b0ab3047bfa2544b6914a2c4e2ea (patch) | |
tree | e254b7ed4a98d5b1d2fecfcbd4add9ad345a87b5 /cmd/ethereum/main.go | |
parent | e30c32339132d678b428ae531932a3f048665f59 (diff) | |
parent | c12046d6bfb197adb0004d629a783dd92f0cfc0f (diff) | |
download | go-tangerine-af9da83ce2c6b0ab3047bfa2544b6914a2c4e2ea.tar go-tangerine-af9da83ce2c6b0ab3047bfa2544b6914a2c4e2ea.tar.gz go-tangerine-af9da83ce2c6b0ab3047bfa2544b6914a2c4e2ea.tar.bz2 go-tangerine-af9da83ce2c6b0ab3047bfa2544b6914a2c4e2ea.tar.lz go-tangerine-af9da83ce2c6b0ab3047bfa2544b6914a2c4e2ea.tar.xz go-tangerine-af9da83ce2c6b0ab3047bfa2544b6914a2c4e2ea.tar.zst go-tangerine-af9da83ce2c6b0ab3047bfa2544b6914a2c4e2ea.zip |
Merge branch 'develop' into rpcfrontier
Diffstat (limited to 'cmd/ethereum/main.go')
-rw-r--r-- | cmd/ethereum/main.go | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go index 3b952dd79..7524af4b2 100644 --- a/cmd/ethereum/main.go +++ b/cmd/ethereum/main.go @@ -30,6 +30,7 @@ import ( "time" "github.com/codegangsta/cli" + "github.com/ethereum/ethash" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -41,7 +42,7 @@ import ( const ( ClientIdentifier = "Ethereum(G)" - Version = "0.9.1" + Version = "Frontier - 0.9.1" ) var ( @@ -55,6 +56,17 @@ func init() { app.Commands = []cli.Command{ blocktestCmd, { + Action: makedag, + Name: "makedag", + Usage: "generate ethash dag (for testing)", + 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 ethereum version numbers", @@ -136,8 +148,8 @@ The Ethereum JavaScript VM exposes a node admin interface as well as the DAPP Ja utils.RPCPortFlag, utils.UnencryptedKeysFlag, utils.VMDebugFlag, - - //utils.VMTypeFlag, + utils.ProtocolVersionFlag, + utils.NetworkIdFlag, } // missing: @@ -318,6 +330,15 @@ func dump(ctx *cli.Context) { } } +func makedag(ctx *cli.Context) { + chain, _, _ := utils.GetChain(ctx) + pow := ethash.New(chain) + fmt.Println("making cache") + pow.UpdateCache(true) + fmt.Println("making DAG") + pow.UpdateDAG() +} + func version(c *cli.Context) { fmt.Printf(`%v Version: %v @@ -327,7 +348,7 @@ GO: %s OS: %s GOPATH=%s GOROOT=%s -`, ClientIdentifier, Version, eth.ProtocolVersion, eth.NetworkId, runtime.Version(), runtime.GOOS, os.Getenv("GOPATH"), runtime.GOROOT()) +`, ClientIdentifier, Version, c.GlobalInt(utils.ProtocolVersionFlag.Name), c.GlobalInt(utils.NetworkIdFlag.Name), runtime.Version(), runtime.GOOS, os.Getenv("GOPATH"), runtime.GOROOT()) } // hashish returns true for strings that look like hashes. |