mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
modify the pathdb.config
This commit is contained in:
parent
1275157f65
commit
68fb2784d3
1 changed files with 5 additions and 3 deletions
|
|
@ -2285,11 +2285,13 @@ func MakeTrieDatabase(ctx *cli.Context, stack *node.Node, disk ethdb.Database, p
|
||||||
config.HashDB = hashdb.Defaults
|
config.HashDB = hashdb.Defaults
|
||||||
return triedb.NewDatabase(disk, config)
|
return triedb.NewDatabase(disk, config)
|
||||||
}
|
}
|
||||||
|
var pathConfig pathdb.Config
|
||||||
if readOnly {
|
if readOnly {
|
||||||
config.PathDB = pathdb.ReadOnly
|
pathConfig = *pathdb.ReadOnly
|
||||||
} else {
|
} else {
|
||||||
config.PathDB = pathdb.Defaults
|
pathConfig = *pathdb.Defaults
|
||||||
}
|
}
|
||||||
config.PathDB.JournalDirectory = stack.ResolvePath("triedb")
|
pathConfig.JournalDirectory = stack.ResolvePath("triedb")
|
||||||
|
config.PathDB = &pathConfig
|
||||||
return triedb.NewDatabase(disk, config)
|
return triedb.NewDatabase(disk, config)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue