mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd: TrieTimeoutFlag configurable option added
This commit is contained in:
parent
27e3f96819
commit
a46376486e
2 changed files with 7 additions and 1 deletions
|
|
@ -92,6 +92,7 @@ var (
|
|||
utils.SyncModeFlag,
|
||||
utils.ExitWhenSyncedFlag,
|
||||
utils.GCModeFlag,
|
||||
utils.TrieTimeoutFlag,
|
||||
utils.LightServFlag,
|
||||
utils.LightPeersFlag,
|
||||
utils.LightKDFFlag,
|
||||
|
|
|
|||
|
|
@ -197,6 +197,11 @@ var (
|
|||
Usage: `Blockchain garbage collection mode ("full", "archive")`,
|
||||
Value: "full",
|
||||
}
|
||||
TrieTimeoutFlag = cli.DurationFlag{
|
||||
Name: "trietimeout",
|
||||
Usage: `Time limit after which to flush the current in-memory trie to disk (default: 10s)`,
|
||||
Value: eth.DefaultConfig.TrieTimeout,
|
||||
}
|
||||
LightServFlag = cli.IntFlag{
|
||||
Name: "lightserv",
|
||||
Usage: "Maximum percentage of time allowed for serving LES requests (0-90)",
|
||||
|
|
@ -1588,7 +1593,7 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai
|
|||
Disabled: ctx.GlobalString(GCModeFlag.Name) == "archive",
|
||||
TrieCleanLimit: eth.DefaultConfig.TrieCleanCache,
|
||||
TrieDirtyLimit: eth.DefaultConfig.TrieDirtyCache,
|
||||
TrieTimeLimit: eth.DefaultConfig.TrieTimeout,
|
||||
TrieTimeLimit: ctx.GlobalDuration(TrieTimeoutFlag.Name),
|
||||
}
|
||||
if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheTrieFlag.Name) {
|
||||
cache.TrieCleanLimit = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheTrieFlag.Name) / 100
|
||||
|
|
|
|||
Loading…
Reference in a new issue