diff options
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/eth/backend.go b/eth/backend.go index 3ec6749b6..6a136182a 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -113,6 +113,12 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { log.Warn("Sanitizing invalid miner gas price", "provided", config.MinerGasPrice, "updated", DefaultConfig.MinerGasPrice) config.MinerGasPrice = new(big.Int).Set(DefaultConfig.MinerGasPrice) } + if config.NoPruning && config.TrieDirtyCache > 0 { + config.TrieCleanCache += config.TrieDirtyCache + config.TrieDirtyCache = 0 + } + log.Info("Allocated trie memory caches", "clean", common.StorageSize(config.TrieCleanCache)*1024*1024, "dirty", common.StorageSize(config.TrieDirtyCache)*1024*1024) + // Assemble the Ethereum object chainDb, err := CreateDB(ctx, config, "chaindata") if err != nil { |