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
ac66d96c
Commit
ac66d96c
authored
Jun 13, 2016
by
Tosh Camille
Committed by
Péter Szilágyi
Jun 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/utils: add space between "to" and filename
parent
970f4c06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
cmd.go
cmd/utils/cmd.go
+5
-5
No files found.
cmd/utils/cmd.go
View file @
ac66d96c
...
...
@@ -120,7 +120,7 @@ func ImportChain(chain *core.BlockChain, fn string) error {
}
}
glog
.
Infoln
(
"Importing blockchain"
,
fn
)
glog
.
Infoln
(
"Importing blockchain
"
,
fn
)
fh
,
err
:=
os
.
Open
(
fn
)
if
err
!=
nil
{
return
err
...
...
@@ -182,7 +182,7 @@ func hasAllBlocks(chain *core.BlockChain, bs []*types.Block) bool {
}
func
ExportChain
(
blockchain
*
core
.
BlockChain
,
fn
string
)
error
{
glog
.
Infoln
(
"Exporting blockchain to"
,
fn
)
glog
.
Infoln
(
"Exporting blockchain to
"
,
fn
)
fh
,
err
:=
os
.
OpenFile
(
fn
,
os
.
O_CREATE
|
os
.
O_WRONLY
|
os
.
O_TRUNC
,
os
.
ModePerm
)
if
err
!=
nil
{
return
err
...
...
@@ -191,12 +191,12 @@ func ExportChain(blockchain *core.BlockChain, fn string) error {
if
err
:=
blockchain
.
Export
(
fh
);
err
!=
nil
{
return
err
}
glog
.
Infoln
(
"Exported blockchain to"
,
fn
)
glog
.
Infoln
(
"Exported blockchain to
"
,
fn
)
return
nil
}
func
ExportAppendChain
(
blockchain
*
core
.
BlockChain
,
fn
string
,
first
uint64
,
last
uint64
)
error
{
glog
.
Infoln
(
"Exporting blockchain to"
,
fn
)
glog
.
Infoln
(
"Exporting blockchain to
"
,
fn
)
// TODO verify mode perms
fh
,
err
:=
os
.
OpenFile
(
fn
,
os
.
O_CREATE
|
os
.
O_APPEND
|
os
.
O_WRONLY
,
os
.
ModePerm
)
if
err
!=
nil
{
...
...
@@ -206,6 +206,6 @@ func ExportAppendChain(blockchain *core.BlockChain, fn string, first uint64, las
if
err
:=
blockchain
.
ExportN
(
fh
,
first
,
last
);
err
!=
nil
{
return
err
}
glog
.
Infoln
(
"Exported blockchain to"
,
fn
)
glog
.
Infoln
(
"Exported blockchain to
"
,
fn
)
return
nil
}
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