From 30ddc903c2616fcd5f7209460aaa716ca94aae07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 2 Feb 2018 17:46:41 +0200 Subject: [PATCH] cmd: drop trie cache timeout flag (available via config) --- cmd/geth/main.go | 1 - cmd/geth/usage.go | 1 - cmd/utils/flags.go | 12 ------------ 3 files changed, 14 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 70e1e696c3..cd5c0af54c 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -91,7 +91,6 @@ var ( utils.CacheFlag, utils.CacheDatabaseFlag, utils.CacheGCFlag, - utils.CacheGCTimeoutFlag, utils.TrieCacheGenFlag, utils.ListenPortFlag, utils.MaxPeersFlag, diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index e6109ee22b..898c16207e 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -130,7 +130,6 @@ var AppHelpFlagGroups = []flagGroup{ utils.CacheFlag, utils.CacheDatabaseFlag, utils.CacheGCFlag, - utils.CacheGCTimeoutFlag, utils.TrieCacheGenFlag, }, }, diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index d396c429c6..cabe3954fb 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -27,7 +27,6 @@ import ( "runtime" "strconv" "strings" - "time" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" @@ -307,11 +306,6 @@ var ( Usage: "Percentage of cache memory allowance to use for trie pruning", Value: 25, } - CacheGCTimeoutFlag = cli.DurationFlag{ - Name: "cache.gc.timeout", - Usage: "Maximum time after which to flush memory-only tries to disk", - Value: 5 * time.Minute, - } TrieCacheGenFlag = cli.IntFlag{ Name: "trie-cache-gens", Usage: "Number of trie node generations to keep in memory", @@ -1045,9 +1039,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) { if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheGCFlag.Name) { cfg.TrieCache = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheGCFlag.Name) / 100 } - if ctx.GlobalIsSet(CacheGCTimeoutFlag.Name) { - cfg.TrieTimeout = ctx.GlobalDuration(CacheGCTimeoutFlag.Name) - } if ctx.GlobalIsSet(MinerThreadsFlag.Name) { cfg.MinerThreads = ctx.GlobalInt(MinerThreadsFlag.Name) } @@ -1238,9 +1229,6 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai if ctx.GlobalIsSet(CacheFlag.Name) || ctx.GlobalIsSet(CacheGCFlag.Name) { cache.TrieNodeLimit = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheGCFlag.Name) / 100 } - if ctx.GlobalIsSet(CacheGCTimeoutFlag.Name) { - cache.TrieTimeLimit = ctx.GlobalDuration(CacheGCTimeoutFlag.Name) - } vmcfg := vm.Config{EnablePreimageRecording: ctx.GlobalBool(VMEnableDebugFlag.Name)} chain, err = core.NewBlockChain(chainDb, cache, config, engine, vmcfg) if err != nil {