cmd: drop trie cache timeout flag (available via config)

This commit is contained in:
Péter Szilágyi 2018-02-02 17:46:41 +02:00
parent 5f253f61ba
commit 30ddc903c2
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D
3 changed files with 0 additions and 14 deletions

View file

@ -91,7 +91,6 @@ var (
utils.CacheFlag,
utils.CacheDatabaseFlag,
utils.CacheGCFlag,
utils.CacheGCTimeoutFlag,
utils.TrieCacheGenFlag,
utils.ListenPortFlag,
utils.MaxPeersFlag,

View file

@ -130,7 +130,6 @@ var AppHelpFlagGroups = []flagGroup{
utils.CacheFlag,
utils.CacheDatabaseFlag,
utils.CacheGCFlag,
utils.CacheGCTimeoutFlag,
utils.TrieCacheGenFlag,
},
},

View file

@ -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 {