From 4a260dc1f28719be860937a2b0c9574d59e51ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 3 Aug 2017 06:32:47 +0200 Subject: cmd: add makecache cmd, use caches during import cmd --- cmd/utils/flags.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd/utils') diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 9f7b76c12..04728b5c6 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1093,7 +1093,10 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai engine := ethash.NewFaker() if !ctx.GlobalBool(FakePoWFlag.Name) { - engine = ethash.New("", 1, 0, "", 1, 0) + engine = ethash.New( + stack.ResolvePath(eth.DefaultConfig.EthashCacheDir), eth.DefaultConfig.EthashCachesInMem, eth.DefaultConfig.EthashCachesOnDisk, + stack.ResolvePath(eth.DefaultConfig.EthashDatasetDir), eth.DefaultConfig.EthashDatasetsInMem, eth.DefaultConfig.EthashDatasetsOnDisk, + ) } config, _, err := core.SetupGenesisBlock(chainDb, MakeGenesis(ctx)) if err != nil { -- cgit v1.2.3