aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2019-03-14 21:25:12 +0800
committerGitHub <noreply@github.com>2019-03-14 21:25:12 +0800
commit91eec1251c06727581063cd7e942ba913d806971 (patch)
treee47da6be2a8b15116b773855cf06473d5b4b64ed /cmd
parente270a753bec7e723e7909b55543a54e26210dd8a (diff)
downloadgo-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.gz
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.bz2
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.lz
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.xz
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.tar.zst
go-tangerine-91eec1251c06727581063cd7e942ba913d806971.zip
cmd, core, eth, trie: get rid of trie cache generations (#19262)
* cmd, core, eth, trie: get rid of trie cache generations * core, trie: get rid of remainder of cache gen boilerplate
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/chaincmd.go4
-rw-r--r--cmd/geth/main.go1
-rw-r--r--cmd/geth/usage.go1
-rw-r--r--cmd/utils/flags.go10
4 files changed, 0 insertions, 16 deletions
diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go
index f0e5d2619..72aace1c6 100644
--- a/cmd/geth/chaincmd.go
+++ b/cmd/geth/chaincmd.go
@@ -35,7 +35,6 @@ import (
"github.com/ethereum/go-ethereum/eth/downloader"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/log"
- "github.com/ethereum/go-ethereum/trie"
"gopkg.in/urfave/cli.v1"
)
@@ -261,9 +260,6 @@ func importChain(ctx *cli.Context) error {
}
fmt.Println(ioStats)
- fmt.Printf("Trie cache misses: %d\n", trie.CacheMisses())
- fmt.Printf("Trie cache unloads: %d\n\n", trie.CacheUnloads())
-
// Print the memory statistics used by the importing
mem := new(runtime.MemStats)
runtime.ReadMemStats(mem)
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index a331abc9f..f966905a9 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -102,7 +102,6 @@ var (
utils.CacheDatabaseFlag,
utils.CacheTrieFlag,
utils.CacheGCFlag,
- utils.TrieCacheGenFlag,
utils.ListenPortFlag,
utils.MaxPeersFlag,
utils.MaxPendingPeersFlag,
diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go
index 0338e447e..a4787fff2 100644
--- a/cmd/geth/usage.go
+++ b/cmd/geth/usage.go
@@ -139,7 +139,6 @@ var AppHelpFlagGroups = []flagGroup{
utils.CacheDatabaseFlag,
utils.CacheTrieFlag,
utils.CacheGCFlag,
- utils.TrieCacheGenFlag,
},
},
{
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index deb6df364..b648f958b 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -37,7 +37,6 @@ import (
"github.com/ethereum/go-ethereum/consensus/clique"
"github.com/ethereum/go-ethereum/consensus/ethash"
"github.com/ethereum/go-ethereum/core"
- "github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/dashboard"
@@ -350,11 +349,6 @@ var (
Usage: "Percentage of cache memory allowance to use for trie pruning (default = 25% full mode, 0% archive mode)",
Value: 25,
}
- TrieCacheGenFlag = cli.IntFlag{
- Name: "trie-cache-gens",
- Usage: "Number of trie node generations to keep in memory",
- Value: int(state.MaxTrieCacheGen),
- }
// Miner settings
MiningEnabledFlag = cli.BoolFlag{
Name: "mine",
@@ -1432,10 +1426,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
cfg.MinerGasPrice = big.NewInt(1)
}
}
- // TODO(fjl): move trie cache generations into config
- if gen := ctx.GlobalInt(TrieCacheGenFlag.Name); gen > 0 {
- state.MaxTrieCacheGen = uint16(gen)
- }
}
// SetDashboardConfig applies dashboard related command line flags to the config.