cmd/utils, eth: relinquish GC cache to read cache in archive mode
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user