mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
cmd/geth: fix era1 download location to match store (#31951)
This changes the era1 downloader to place the files into the correct location where geth will actually use them. Also adds integration with the new --datadir.era flag.
This commit is contained in:
parent
4bb097b7ff
commit
0007f62da5
1 changed files with 5 additions and 1 deletions
|
|
@ -723,8 +723,12 @@ func downloadEra(ctx *cli.Context) error {
|
||||||
// Resolve the destination directory.
|
// Resolve the destination directory.
|
||||||
stack, _ := makeConfigNode(ctx)
|
stack, _ := makeConfigNode(ctx)
|
||||||
defer stack.Close()
|
defer stack.Close()
|
||||||
|
|
||||||
ancients := stack.ResolveAncient("chaindata", "")
|
ancients := stack.ResolveAncient("chaindata", "")
|
||||||
dir := filepath.Join(ancients, "era")
|
dir := filepath.Join(ancients, rawdb.ChainFreezerName, "era")
|
||||||
|
if ctx.IsSet(utils.EraFlag.Name) {
|
||||||
|
dir = filepath.Join(ancients, ctx.String(utils.EraFlag.Name))
|
||||||
|
}
|
||||||
|
|
||||||
baseURL := ctx.String(eraServerFlag.Name)
|
baseURL := ctx.String(eraServerFlag.Name)
|
||||||
if baseURL == "" {
|
if baseURL == "" {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue