core: enable history indexing in archive mode

This commit is contained in:
Gary Rong 2025-05-29 17:14:48 +08:00
parent 30363362ab
commit a9d42f36d5

View file

@ -242,9 +242,10 @@ func (cfg *BlockChainConfig) triedbConfig(isVerkle bool) *triedb.Config {
} }
if cfg.StateScheme == rawdb.PathScheme { if cfg.StateScheme == rawdb.PathScheme {
config.PathDB = &pathdb.Config{ config.PathDB = &pathdb.Config{
StateHistory: cfg.StateHistory, StateHistory: cfg.StateHistory,
TrieCleanSize: cfg.TrieCleanLimit * 1024 * 1024, EnableStateIndexing: cfg.ArchiveMode,
StateCleanSize: cfg.SnapshotLimit * 1024 * 1024, TrieCleanSize: cfg.TrieCleanLimit * 1024 * 1024,
StateCleanSize: cfg.SnapshotLimit * 1024 * 1024,
// TODO(rjl493456442): The write buffer represents the memory limit used // TODO(rjl493456442): The write buffer represents the memory limit used
// for flushing both trie data and state data to disk. The config name // for flushing both trie data and state data to disk. The config name