From 4ab4db881622d2612276107c39508c961f6fda83 Mon Sep 17 00:00:00 2001 From: Louianne Jasper Date: Tue, 5 May 2020 00:28:04 -0400 Subject: [PATCH] eth: don't reassign more cache than is being made available --- eth/backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/backend.go b/eth/backend.go index c669fa9743..005c94c7c8 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -126,7 +126,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { } if config.NoPruning && config.TrieDirtyCache > 0 { config.TrieCleanCache += config.TrieDirtyCache * 3 / 5 - config.SnapshotCache += config.TrieDirtyCache * 3 / 5 + config.SnapshotCache += config.TrieDirtyCache * 2 / 5 config.TrieDirtyCache = 0 } log.Info("Allocated trie memory caches", "clean", common.StorageSize(config.TrieCleanCache)*1024*1024, "dirty", common.StorageSize(config.TrieDirtyCache)*1024*1024)