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

@ -243,6 +243,7 @@ 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,
EnableStateIndexing: cfg.ArchiveMode,
TrieCleanSize: cfg.TrieCleanLimit * 1024 * 1024, TrieCleanSize: cfg.TrieCleanLimit * 1024 * 1024,
StateCleanSize: cfg.SnapshotLimit * 1024 * 1024, StateCleanSize: cfg.SnapshotLimit * 1024 * 1024,