aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-19 01:23:37 +0800
committerobscuren <geffobscura@gmail.com>2015-03-19 01:23:37 +0800
commitf9a6038f5b82cad6956c9cbb7f1220d97570632b (patch)
tree78fb61bed1924b60c3c4d59e5a5a471f55f91de7 /cmd
parent4d0ae8b0cb32e9de63092bc36022ea4af76cad8b (diff)
parentbaca0c2251a2587c136999a91449d9b6f7a6c60f (diff)
downloadgo-tangerine-f9a6038f5b82cad6956c9cbb7f1220d97570632b.tar
go-tangerine-f9a6038f5b82cad6956c9cbb7f1220d97570632b.tar.gz
go-tangerine-f9a6038f5b82cad6956c9cbb7f1220d97570632b.tar.bz2
go-tangerine-f9a6038f5b82cad6956c9cbb7f1220d97570632b.tar.lz
go-tangerine-f9a6038f5b82cad6956c9cbb7f1220d97570632b.tar.xz
go-tangerine-f9a6038f5b82cad6956c9cbb7f1220d97570632b.tar.zst
go-tangerine-f9a6038f5b82cad6956c9cbb7f1220d97570632b.zip
merge
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ethereum/main.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmd/ethereum/main.go b/cmd/ethereum/main.go
index 459059e6c..9ebbd9880 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"
@@ -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",
@@ -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