Skip to content

Commit a5b5caa

Browse files
author
Darioush Jalali
committed
rename config flag
1 parent 253e5c6 commit a5b5caa

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

core/blockchain.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ func (c *CacheConfig) triedbConfig() *triedb.Config {
198198
config := &triedb.Config{Preimages: c.Preimages}
199199
if c.StateScheme == rawdb.HashScheme || c.StateScheme == "" {
200200
config.HashDB = &hashdb.Config{
201-
CleanCacheSize: c.TrieCleanLimit * 1024 * 1024,
202-
StatsPrefix: trieCleanCacheStatsNamespace,
203-
ReferenceRoot: true,
201+
CleanCacheSize: c.TrieCleanLimit * 1024 * 1024,
202+
StatsPrefix: trieCleanCacheStatsNamespace,
203+
ReferenceRootAtomicallyOnUpdate: true,
204204
}
205205
}
206206
if c.StateScheme == rawdb.PathScheme {

triedb/hashdb/database.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ type cache interface {
9797

9898
// Config contains the settings for database.
9999
type Config struct {
100-
CleanCacheSize int // Maximum memory allowance (in bytes) for caching clean nodes
101-
StatsPrefix string // Prefix for cache stats (disabled if empty)
102-
ReferenceRoot bool // Whether to reference the root node on update
100+
CleanCacheSize int // Maximum memory allowance (in bytes) for caching clean nodes
101+
StatsPrefix string // Prefix for cache stats (disabled if empty)
102+
ReferenceRootAtomicallyOnUpdate bool // Whether to reference the root node on update
103103
}
104104

105105
// Defaults is the default setting for database if it's not specified.
@@ -181,7 +181,7 @@ func New(diskdb ethdb.Database, config *Config, resolver ChildResolver) *Databas
181181
resolver: resolver,
182182
cleans: cleans,
183183
dirties: make(map[common.Hash]*cachedNode),
184-
referenceRoot: config.ReferenceRoot,
184+
referenceRoot: config.ReferenceRootAtomicallyOnUpdate,
185185
}
186186
}
187187

0 commit comments

Comments
 (0)