aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-03-06 23:20:25 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-03-09 22:50:14 +0800
commitb7d93500f13e3054c81196273ebf676ad8ecb5ba (patch)
tree1b6c60cbb6b235d87f78ff9a814f1a574510215a /cmd/utils/flags.go
parentdf72e20cc521b43092b9e3cc684836d4d673e126 (diff)
downloadgo-tangerine-b7d93500f13e3054c81196273ebf676ad8ecb5ba.tar.gz
go-tangerine-b7d93500f13e3054c81196273ebf676ad8ecb5ba.tar.zst
go-tangerine-b7d93500f13e3054c81196273ebf676ad8ecb5ba.zip
all: finish integrating Go ethash, delete C++ vendor
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index b92be8464..38c90d801 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -132,9 +132,14 @@ var (
Name: "ethash.dagdir",
Usage: "Directory to store the ethash mining DAGs (default = inside home folder)",
}
+ EthashDatasetsInMemoryFlag = cli.IntFlag{
+ Name: "ethash.dagsinmem",
+ Usage: "Number of recent ethash mining DAGs to keep in memory (1+GB each)",
+ Value: 1,
+ }
EthashDatasetsOnDiskFlag = cli.IntFlag{
Name: "ethash.dagsondisk",
- Usage: "Number of ethash mining DAGs to keep on disk (1+GB each)",
+ Usage: "Number of recent ethash mining DAGs to keep on disk (1+GB each)",
Value: 2,
}
NetworkIdFlag = cli.IntFlag{
@@ -207,10 +212,6 @@ var (
Usage: "Target gas limit sets the artificial target gas floor for the blocks to mine",
Value: params.GenesisGasLimit.Uint64(),
}
- AutoDAGFlag = cli.BoolFlag{
- Name: "autodag",
- Usage: "Enable automatic DAG pregeneration",
- }
EtherbaseFlag = cli.StringFlag{
Name: "etherbase",
Usage: "Public address for block mining rewards (default = first account created)",
@@ -809,8 +810,8 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) {
EthashCachesInMem: ctx.GlobalInt(EthashCachesInMemoryFlag.Name),
EthashCachesOnDisk: ctx.GlobalInt(EthashCachesOnDiskFlag.Name),
EthashDatasetDir: MakeEthashDatasetDir(ctx),
+ EthashDatasetsInMem: ctx.GlobalInt(EthashDatasetsInMemoryFlag.Name),
EthashDatasetsOnDisk: ctx.GlobalInt(EthashDatasetsOnDiskFlag.Name),
- AutoDAG: ctx.GlobalBool(AutoDAGFlag.Name) || ctx.GlobalBool(MiningEnabledFlag.Name),
EnablePreimageRecording: ctx.GlobalBool(VMEnableDebugFlag.Name),
}
@@ -982,7 +983,7 @@ func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chai
seal := pow.PoW(pow.FakePow{})
if !ctx.GlobalBool(FakePoWFlag.Name) {
- seal = pow.NewFullEthash("", 1, 0, "", 0)
+ seal = pow.NewFullEthash("", 1, 0, "", 1, 0)
}
chain, err = core.NewBlockChain(chainDb, chainConfig, seal, new(event.TypeMux), vm.Config{EnablePreimageRecording: ctx.GlobalBool(VMEnableDebugFlag.Name)})
if err != nil {