Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
rawdb.WriteDatabaseVersion(chainDb, core.BlockChainVersion)
}
}
trieJournalDirectory := config.TrieJournalDirectory
if trieJournalDirectory == "" {
trieJournalDirectory = stack.ResolvePath("triedb")
}

var (
options = &core.BlockChainConfig{
TrieCleanLimit: config.TrieCleanCache,
Expand Down Expand Up @@ -296,7 +301,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
// within the data directory. The corresponding paths will be either:
// - DATADIR/triedb/merkle.journal
// - DATADIR/triedb/verkle.journal
TrieJournalDirectory: stack.ResolvePath("triedb"),
TrieJournalDirectory: trieJournalDirectory,
StateSizeTracking: config.EnableStateSizeTracking,
}
)
Expand Down
2 changes: 2 additions & 0 deletions eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ type Config struct {
SnapshotCache int
Preimages bool
TriesInMemory uint64
// Directory path to the journal used for persisting trie data across node restarts.
TrieJournalDirectory string

// This is the number of blocks for which logs will be cached in the filter system.
FilterLogCacheSize int
Expand Down
6 changes: 6 additions & 0 deletions eth/ethconfig/gen_config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions internal/cli/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,11 @@ func (c *Config) buildEth(stack *node.Node, accountManager *accounts.Manager) (*
n.TransactionHistory = c.Cache.TxLookupLimit
n.TrieTimeout = c.Cache.TrieTimeout
n.TriesInMemory = c.Cache.TriesInMemory
trieJournalDirectory := c.Cache.TrieJournalDirectory
if trieJournalDirectory == "" {
trieJournalDirectory = "triedb"
}
n.TrieJournalDirectory = stack.ResolvePath(trieJournalDirectory)
n.FilterLogCacheSize = c.Cache.FilterLogCacheSize

// Parse address-specific cache sizes
Expand Down
Loading