Skip to content

Commit

Permalink
rename config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush committed Oct 16, 2024
1 parent 253e5c6 commit a5b5caa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ func (c *CacheConfig) triedbConfig() *triedb.Config {
config := &triedb.Config{Preimages: c.Preimages}
if c.StateScheme == rawdb.HashScheme || c.StateScheme == "" {
config.HashDB = &hashdb.Config{
CleanCacheSize: c.TrieCleanLimit * 1024 * 1024,
StatsPrefix: trieCleanCacheStatsNamespace,
ReferenceRoot: true,
CleanCacheSize: c.TrieCleanLimit * 1024 * 1024,
StatsPrefix: trieCleanCacheStatsNamespace,
ReferenceRootAtomicallyOnUpdate: true,
}
}
if c.StateScheme == rawdb.PathScheme {
Expand Down
8 changes: 4 additions & 4 deletions triedb/hashdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ type cache interface {

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

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

Expand Down

0 comments on commit a5b5caa

Please sign in to comment.