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
8b517d7f
Unverified
Commit
8b517d7f
authored
May 02, 2017
by
Bas van Kervel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/geth: reorganise chain commands/flags
parent
cad07100
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
20 deletions
+41
-20
chaincmd.go
cmd/geth/chaincmd.go
+41
-20
No files found.
cmd/geth/chaincmd.go
View file @
8b517d7f
...
...
@@ -40,63 +40,84 @@ import (
var
(
initCommand
=
cli
.
Command
{
Action
:
initGenesis
,
Action
:
utils
.
MigrateFlags
(
initGenesis
)
,
Name
:
"init"
,
Usage
:
"Bootstrap and initialize a new genesis block"
,
ArgsUsage
:
"<genesisPath>"
,
Category
:
"BLOCKCHAIN COMMANDS"
,
Flags
:
[]
cli
.
Flag
{
utils
.
DataDirFlag
,
utils
.
LightModeFlag
,
},
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.
`
,
It expects the genesis file as argument.`
,
}
importCommand
=
cli
.
Command
{
Action
:
importChain
,
Action
:
utils
.
MigrateFlags
(
importChain
)
,
Name
:
"import"
,
Usage
:
"Import a blockchain file"
,
ArgsUsage
:
"<filename> (<filename 2> ... <filename N>) "
,
Category
:
"BLOCKCHAIN COMMANDS"
,
Flags
:
[]
cli
.
Flag
{
utils
.
DataDirFlag
,
utils
.
CacheFlag
,
utils
.
LightModeFlag
,
},
Category
:
"BLOCKCHAIN COMMANDS"
,
Description
:
`
The import command imports blocks from an RLP-encoded form. The form can be one file
with several RLP-encoded blocks, or several files can be used.
If only one file is used, import error will result in failure. If several files are used,
processing will proceed even if an individual RLP-file import failure occurs.
`
,
If only one file is used, import error will result in failure. If several files are used,
processing will proceed even if an individual RLP-file import failure occurs.
`
,
}
exportCommand
=
cli
.
Command
{
Action
:
exportChain
,
Action
:
utils
.
MigrateFlags
(
exportChain
)
,
Name
:
"export"
,
Usage
:
"Export blockchain into file"
,
ArgsUsage
:
"<filename> [<blockNumFirst> <blockNumLast>]"
,
Category
:
"BLOCKCHAIN COMMANDS"
,
Flags
:
[]
cli
.
Flag
{
utils
.
DataDirFlag
,
utils
.
CacheFlag
,
utils
.
LightModeFlag
,
},
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.
`
,
if already existing.`
,
}
removedbCommand
=
cli
.
Command
{
Action
:
removeDB
,
Action
:
utils
.
MigrateFlags
(
removeDB
)
,
Name
:
"removedb"
,
Usage
:
"Remove blockchain and state databases"
,
ArgsUsage
:
" "
,
Category
:
"BLOCKCHAIN COMMANDS"
,
Flags
:
[]
cli
.
Flag
{
utils
.
DataDirFlag
,
utils
.
LightModeFlag
,
},
Category
:
"BLOCKCHAIN COMMANDS"
,
Description
:
`
TODO: Please write this
`
,
Remove blockchain and state databases`
,
}
dumpCommand
=
cli
.
Command
{
Action
:
dump
,
Action
:
utils
.
MigrateFlags
(
dump
)
,
Name
:
"dump"
,
Usage
:
"Dump a specific block from storage"
,
ArgsUsage
:
"[<blockHash> | <blockNum>]..."
,
Category
:
"BLOCKCHAIN COMMANDS"
,
Flags
:
[]
cli
.
Flag
{
utils
.
DataDirFlag
,
utils
.
CacheFlag
,
utils
.
LightModeFlag
,
},
Category
:
"BLOCKCHAIN COMMANDS"
,
Description
:
`
The arguments are interpreted as block numbers or hashes.
Use "ethereum dump 0" to dump the genesis block.
`
,
Use "ethereum dump 0" to dump the genesis block.`
,
}
)
...
...
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