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
ed621aae
Commit
ed621aae
authored
Jun 06, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
d65b64c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
chaincmd.go
cmd/geth/chaincmd.go
+1
-1
chain_manager.go
core/chain_manager.go
+1
-2
No files found.
cmd/geth/chaincmd.go
View file @
ed621aae
...
...
@@ -69,7 +69,7 @@ func importChain(ctx *cli.Context) {
}
func
exportChain
(
ctx
*
cli
.
Context
)
{
if
len
(
ctx
.
Args
())
!=
1
{
if
len
(
ctx
.
Args
())
<
1
{
utils
.
Fatalf
(
"This command requires an argument."
)
}
chain
,
_
,
_
,
_
:=
utils
.
MakeChain
(
ctx
)
...
...
core/chain_manager.go
View file @
ed621aae
...
...
@@ -351,13 +351,12 @@ func (self *ChainManager) Export(w io.Writer) error {
func
(
self
*
ChainManager
)
ExportN
(
w
io
.
Writer
,
first
uint64
,
last
uint64
)
error
{
self
.
mu
.
RLock
()
defer
self
.
mu
.
RUnlock
()
glog
.
V
(
logger
.
Info
)
.
Infof
(
"exporting %v blocks...
\n
"
,
self
.
currentBlock
.
Header
()
.
Number
)
if
first
>
last
{
return
fmt
.
Errorf
(
"export failed: first (%d) is greater than last (%d)"
,
first
,
last
)
}
glog
.
V
(
logger
.
Info
)
.
Infof
(
"exporting %d blocks...
\n
"
,
last
-
first
)
glog
.
V
(
logger
.
Info
)
.
Infof
(
"exporting %d blocks...
\n
"
,
last
-
first
+
1
)
for
nr
:=
first
;
nr
<=
last
;
nr
++
{
block
:=
self
.
GetBlockByNumber
(
nr
)
...
...
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