diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index 519f22a964..950206c657 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -60,7 +60,7 @@ var Defaults = Config{ TrieCleanCache: 154, TrieDirtyCache: 256, TrieTimeout: 60 * time.Minute, - TrieDBJournal: "triedb.journal", + TrieDBJournal: "triedb.journal.rlp", SnapshotCache: 102, FilterLogCacheSize: 32, Miner: miner.DefaultConfig, diff --git a/triedb/pathdb/journal.go b/triedb/pathdb/journal.go index cbecef456f..e6a26937d9 100644 --- a/triedb/pathdb/journal.go +++ b/triedb/pathdb/journal.go @@ -344,7 +344,7 @@ func (db *Database) Journal(root common.Hash) error { var err error file, err = os.OpenFile(tmpName, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) if err != nil { - return fmt.Errorf("failed to open journal file %s: %w", db.config.JournalPath, err) + return fmt.Errorf("failed to open journal file %s: %w", tmpName, err) } defer func() { if file != nil {