Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
3e52c943
Commit
3e52c943
authored
Mar 18, 2015
by
Felix Lange
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #522 from fjl/makedag
cmd/ethereum: add makedag command for testing
parents
3ea99f98
b422835a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
main.go
cmd/ethereum/main.go
+21
-0
No files found.
cmd/ethereum/main.go
View file @
3e52c943
...
@@ -30,6 +30,7 @@ import (
...
@@ -30,6 +30,7 @@ import (
"time"
"time"
"github.com/codegangsta/cli"
"github.com/codegangsta/cli"
"github.com/ethereum/ethash"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/types"
...
@@ -54,6 +55,17 @@ func init() {
...
@@ -54,6 +55,17 @@ func init() {
app
.
HideVersion
=
true
// we have a command to print the version
app
.
HideVersion
=
true
// we have a command to print the version
app
.
Commands
=
[]
cli
.
Command
{
app
.
Commands
=
[]
cli
.
Command
{
blocktestCmd
,
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
,
Action
:
version
,
Name
:
"version"
,
Name
:
"version"
,
...
@@ -318,6 +330,15 @@ func dump(ctx *cli.Context) {
...
@@ -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
)
{
func
version
(
c
*
cli
.
Context
)
{
fmt
.
Printf
(
`%v
fmt
.
Printf
(
`%v
Version: %v
Version: %v
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment