mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-05 15:52:55 +00:00
core/rawdb: fix ancient root folder (#29697)
This commit is contained in:
parent
2c67fab0d7
commit
86a1f0c394
1 changed files with 4 additions and 3 deletions
|
|
@ -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,
|
// 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
|
// in-memory chain freezer is used (e.g. dev mode); otherwise the regular
|
||||||
// file-based freezer is created.
|
// file-based freezer is created.
|
||||||
if ancient != "" {
|
chainFreezerDir := ancient
|
||||||
ancient = resolveChainFreezerDir(ancient)
|
if chainFreezerDir != "" {
|
||||||
|
chainFreezerDir = resolveChainFreezerDir(chainFreezerDir)
|
||||||
}
|
}
|
||||||
frdb, err := newChainFreezer(ancient, namespace, readonly)
|
frdb, err := newChainFreezer(chainFreezerDir, namespace, readonly)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
printChainMetadata(db)
|
printChainMetadata(db)
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue