From 820316f8a4dedbdc1e5719e931373ff33dcf2c23 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 3 Jun 2025 10:55:57 +0200 Subject: [PATCH] cmd/geth: fix era1 download location to match store 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. --- cmd/geth/chaincmd.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index d8488b8268..9be37c5a25 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -723,8 +723,12 @@ func downloadEra(ctx *cli.Context) error { // Resolve the destination directory. stack, _ := makeConfigNode(ctx) defer stack.Close() - ancients := stack.ResolveAncient("chaindata", "") + + ancients := stack.ResolveAncient("chaindata", "chain") dir := filepath.Join(ancients, "era") + if ctx.IsSet(utils.EraFlag.Name) { + dir = filepath.Join(ancients, ctx.String(utils.EraFlag.Name)) + } baseURL := ctx.String(eraServerFlag.Name) if baseURL == "" {