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
bbe694fc
Unverified
Commit
bbe694fc
authored
Feb 08, 2021
by
Péter Szilágyi
Committed by
GitHub
Feb 08, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #22280 from karalabe/snapshot-default
cmd/utils: enable snapshots by default
parents
477fd420
994cdc69
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
flags.go
cmd/utils/flags.go
+4
-4
No files found.
cmd/utils/flags.go
View file @
bbe694fc
...
...
@@ -208,9 +208,9 @@ var (
Usage
:
`Blockchain garbage collection mode ("full", "archive")`
,
Value
:
"full"
,
}
SnapshotFlag
=
cli
.
BoolFlag
{
SnapshotFlag
=
cli
.
Bool
T
Flag
{
Name
:
"snapshot"
,
Usage
:
`Enables snapshot-database mode
-- experimental work in progress feature
`
,
Usage
:
`Enables snapshot-database mode
(default = enable)
`
,
}
TxLookupLimitFlag
=
cli
.
Int64Flag
{
Name
:
"txlookuplimit"
,
...
...
@@ -1579,7 +1579,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
if
ctx
.
GlobalIsSet
(
CacheFlag
.
Name
)
||
ctx
.
GlobalIsSet
(
CacheSnapshotFlag
.
Name
)
{
cfg
.
SnapshotCache
=
ctx
.
GlobalInt
(
CacheFlag
.
Name
)
*
ctx
.
GlobalInt
(
CacheSnapshotFlag
.
Name
)
/
100
}
if
!
ctx
.
Global
IsSet
(
SnapshotFlag
.
Name
)
{
if
!
ctx
.
Global
Bool
(
SnapshotFlag
.
Name
)
{
// If snap-sync is requested, this flag is also required
if
cfg
.
SyncMode
==
downloader
.
SnapSync
{
log
.
Info
(
"Snap sync requested, enabling --snapshot"
)
...
...
@@ -1893,7 +1893,7 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readOnly bool) (chain *core.B
cache
.
Preimages
=
true
log
.
Info
(
"Enabling recording of key preimages since archive mode is used"
)
}
if
!
ctx
.
Global
IsSet
(
SnapshotFlag
.
Name
)
{
if
!
ctx
.
Global
Bool
(
SnapshotFlag
.
Name
)
{
cache
.
SnapshotLimit
=
0
// Disabled
}
if
ctx
.
GlobalIsSet
(
CacheFlag
.
Name
)
||
ctx
.
GlobalIsSet
(
CacheTrieFlag
.
Name
)
{
...
...
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