diff --git a/eth/backend.go b/eth/backend.go index 0b1afebb64..6b7e316a79 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -238,9 +238,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { }, // Enables file journaling for the trie database. The journal files will be stored // within the data directory. The corresponding paths will be either: - // - DATADIR/merkle.journal - // - DATADIR/verkle.journal - TrieJournalDirectory: stack.ResolvePath(""), + // - DATADIR/triedb/merkle.journal + // - DATADIR/triedb/verkle.journal + TrieJournalDirectory: stack.ResolvePath("triedb"), } ) if config.VMTrace != "" { diff --git a/triedb/pathdb/journal.go b/triedb/pathdb/journal.go index d9c4b14670..87d8f9afe7 100644 --- a/triedb/pathdb/journal.go +++ b/triedb/pathdb/journal.go @@ -342,7 +342,7 @@ func (db *Database) Journal(root common.Hash) error { ) if journalPath != "" { // Write into a temp file first - err := os.Mkdir(db.config.JournalDirectory, 0755) + err := os.MkdirAll(db.config.JournalDirectory, 0755) if err != nil { return err }