mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth: don't reassign more cache than is being made available
This commit is contained in:
parent
587656619d
commit
4ab4db8816
1 changed files with 1 additions and 1 deletions
|
|
@ -126,7 +126,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
||||||
}
|
}
|
||||||
if config.NoPruning && config.TrieDirtyCache > 0 {
|
if config.NoPruning && config.TrieDirtyCache > 0 {
|
||||||
config.TrieCleanCache += config.TrieDirtyCache * 3 / 5
|
config.TrieCleanCache += config.TrieDirtyCache * 3 / 5
|
||||||
config.SnapshotCache += config.TrieDirtyCache * 3 / 5
|
config.SnapshotCache += config.TrieDirtyCache * 2 / 5
|
||||||
config.TrieDirtyCache = 0
|
config.TrieDirtyCache = 0
|
||||||
}
|
}
|
||||||
log.Info("Allocated trie memory caches", "clean", common.StorageSize(config.TrieCleanCache)*1024*1024, "dirty", common.StorageSize(config.TrieDirtyCache)*1024*1024)
|
log.Info("Allocated trie memory caches", "clean", common.StorageSize(config.TrieCleanCache)*1024*1024, "dirty", common.StorageSize(config.TrieDirtyCache)*1024*1024)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue