mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
fix ctx.String(GCModeFlag.Name) == "archive"
This commit is contained in:
parent
07076c519d
commit
7e62dffd71
1 changed files with 3 additions and 1 deletions
|
|
@ -2415,7 +2415,6 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh
|
|||
TrieCleanLimit: ethconfig.Defaults.TrieCleanCache,
|
||||
NoPrefetch: ctx.Bool(CacheNoPrefetchFlag.Name),
|
||||
TrieDirtyLimit: ethconfig.Defaults.TrieDirtyCache,
|
||||
ArchiveMode: ctx.String(GCModeFlag.Name) == "archive",
|
||||
TrieTimeLimit: ethconfig.Defaults.TrieTimeout,
|
||||
SnapshotLimit: ethconfig.Defaults.SnapshotCache,
|
||||
Preimages: ctx.Bool(CachePreimagesFlag.Name),
|
||||
|
|
@ -2439,6 +2438,9 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh
|
|||
// Configure the slow block statistic logger (disabled by default)
|
||||
SlowBlockThreshold: ethconfig.Defaults.SlowBlockThreshold,
|
||||
}
|
||||
if ctx.IsSet(GCModeFlag.Name) {
|
||||
options.ArchiveMode = ctx.String(GCModeFlag.Name) == "archive"
|
||||
}
|
||||
// Only enable slow block logging if the flag was explicitly set
|
||||
if ctx.IsSet(LogSlowBlockFlag.Name) {
|
||||
options.SlowBlockThreshold = ctx.Duration(LogSlowBlockFlag.Name)
|
||||
|
|
|
|||
Loading…
Reference in a new issue