Skip to content

Commit 0007f62

Browse files
authored
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.
1 parent 4bb097b commit 0007f62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/geth/chaincmd.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,12 @@ func downloadEra(ctx *cli.Context) error {
723723
// Resolve the destination directory.
724724
stack, _ := makeConfigNode(ctx)
725725
defer stack.Close()
726+
726727
ancients := stack.ResolveAncient("chaindata", "")
727-
dir := filepath.Join(ancients, "era")
728+
dir := filepath.Join(ancients, rawdb.ChainFreezerName, "era")
729+
if ctx.IsSet(utils.EraFlag.Name) {
730+
dir = filepath.Join(ancients, ctx.String(utils.EraFlag.Name))
731+
}
728732

729733
baseURL := ctx.String(eraServerFlag.Name)
730734
if baseURL == "" {

0 commit comments

Comments
 (0)