Skip to content

Commit 9e0e638

Browse files
karalabecfilipescu
authored andcommitted
cmd/utils: enable snapshots by default
1 parent 477fd42 commit 9e0e638

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd/utils/flags.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ var (
208208
Usage: `Blockchain garbage collection mode ("full", "archive")`,
209209
Value: "full",
210210
}
211-
SnapshotFlag = cli.BoolFlag{
211+
SnapshotFlag = cli.BoolTFlag{
212212
Name: "snapshot",
213-
Usage: `Enables snapshot-database mode -- experimental work in progress feature`,
213+
Usage: `Enables snapshot-database mode (default = enable)`,
214214
}
215215
TxLookupLimitFlag = cli.Int64Flag{
216216
Name: "txlookuplimit",
@@ -1579,7 +1579,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
15791579
if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheSnapshotFlag.Name) {
15801580
cfg.SnapshotCache = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheSnapshotFlag.Name) / 100
15811581
}
1582-
if !ctx.GlobalIsSet(SnapshotFlag.Name) {
1582+
if !ctx.GlobalBool(SnapshotFlag.Name) {
15831583
// If snap-sync is requested, this flag is also required
15841584
if cfg.SyncMode == downloader.SnapSync {
15851585
log.Info("Snap sync requested, enabling --snapshot")
@@ -1893,7 +1893,7 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readOnly bool) (chain *core.B
18931893
cache.Preimages = true
18941894
log.Info("Enabling recording of key preimages since archive mode is used")
18951895
}
1896-
if !ctx.GlobalIsSet(SnapshotFlag.Name) {
1896+
if !ctx.GlobalBool(SnapshotFlag.Name) {
18971897
cache.SnapshotLimit = 0 // Disabled
18981898
}
18991899
if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheTrieFlag.Name) {

0 commit comments

Comments
 (0)