cmd/utils: enable file journal in MakeChain

This commit is contained in:
Gary Rong 2025-07-01 13:50:04 +08:00
parent 42ae12b469
commit 92bd4de5cf

View file

@ -2198,6 +2198,12 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh
StateHistory: ctx.Uint64(StateHistoryFlag.Name),
// Disable transaction indexing/unindexing.
TxLookupLimit: -1,
// Enables file journaling for the trie database. The journal files will be stored
// within the data directory. The corresponding paths will be either:
// - DATADIR/triedb/merkle.journal
// - DATADIR/triedb/verkle.journal
TrieJournalDirectory: stack.ResolvePath("triedb"),
}
if options.ArchiveMode && !options.Preimages {
options.Preimages = true