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
c6a11fe3
Commit
c6a11fe3
authored
Aug 19, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1680 from maran/fix_removedb
cmd/geth: Fix chain purging from cmd line
parents
3b997c3e
4d5501c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
chaincmd.go
cmd/geth/chaincmd.go
+3
-4
No files found.
cmd/geth/chaincmd.go
View file @
c6a11fe3
...
@@ -115,17 +115,16 @@ func exportChain(ctx *cli.Context) {
...
@@ -115,17 +115,16 @@ func exportChain(ctx *cli.Context) {
}
}
func
removeDB
(
ctx
*
cli
.
Context
)
{
func
removeDB
(
ctx
*
cli
.
Context
)
{
confirm
,
err
:=
utils
.
PromptConfirm
(
"Remove local database
s
?"
)
confirm
,
err
:=
utils
.
PromptConfirm
(
"Remove local database?"
)
if
err
!=
nil
{
if
err
!=
nil
{
utils
.
Fatalf
(
"%v"
,
err
)
utils
.
Fatalf
(
"%v"
,
err
)
}
}
if
confirm
{
if
confirm
{
fmt
.
Println
(
"Removing chain
and state databases
..."
)
fmt
.
Println
(
"Removing chain
data
..."
)
start
:=
time
.
Now
()
start
:=
time
.
Now
()
os
.
RemoveAll
(
filepath
.
Join
(
ctx
.
GlobalString
(
utils
.
DataDirFlag
.
Name
),
"blockchain"
))
os
.
RemoveAll
(
filepath
.
Join
(
ctx
.
GlobalString
(
utils
.
DataDirFlag
.
Name
),
"chaindata"
))
os
.
RemoveAll
(
filepath
.
Join
(
ctx
.
GlobalString
(
utils
.
DataDirFlag
.
Name
),
"state"
))
fmt
.
Printf
(
"Removed in %v
\n
"
,
time
.
Since
(
start
))
fmt
.
Printf
(
"Removed in %v
\n
"
,
time
.
Since
(
start
))
}
else
{
}
else
{
...
...
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