Skip to content

Commit

Permalink
core/rawdb: fix ancient root folder (ethereum#29697)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 authored May 2, 2024
1 parent 2c67fab commit 86a1f0c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/rawdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,11 @@ func NewDatabaseWithFreezer(db ethdb.KeyValueStore, ancient string, namespace st
// Create the idle freezer instance. If the given ancient directory is empty,
// in-memory chain freezer is used (e.g. dev mode); otherwise the regular
// file-based freezer is created.
if ancient != "" {
ancient = resolveChainFreezerDir(ancient)
chainFreezerDir := ancient
if chainFreezerDir != "" {
chainFreezerDir = resolveChainFreezerDir(chainFreezerDir)
}
frdb, err := newChainFreezer(ancient, namespace, readonly)
frdb, err := newChainFreezer(chainFreezerDir, namespace, readonly)
if err != nil {
printChainMetadata(db)
return nil, err
Expand Down

0 comments on commit 86a1f0c

Please sign in to comment.