eth, triedb: fix mkdir

This commit is contained in:
Gary Rong 2025-06-27 14:12:47 +08:00
parent 6bb3dfc8c7
commit 7afd7d0976
2 changed files with 4 additions and 4 deletions

View file

@ -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 != "" {

View file

@ -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
}