From bed80133e0573ebeefa201a15b20188198adf0ac Mon Sep 17 00:00:00 2001 From: zelig Date: Wed, 20 May 2015 16:56:17 +0100 Subject: automatic DAG pregeneration for smooth epoch transitions - backend: AutoDAG bool flag passed from cli/eth.Config to ethereum, autoDAG loop started if true - backend: autoDAG loop start/stop, remove previous DAG - cli: AutoDAG bool flag, off by default, but automatically ON if mining - admin jsre: add startAutoDAG stopAutoDAG and makeDAG in miner section - switch on/off DAG autogeneration when miner started/stopped on console --- cmd/utils/flags.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd/utils/flags.go') diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 2766e7517..cb774aa5b 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -112,6 +112,10 @@ var ( Name: "mine", Usage: "Enable mining", } + AutoDAGFlag = cli.BoolFlag{ + Name: "autodag", + Usage: "Enable automatic DAG pregeneration", + } EtherbaseFlag = cli.StringFlag{ Name: "etherbase", Usage: "Public address for block mining rewards. By default the address of your primary account is used", @@ -314,6 +318,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { BootNodes: ctx.GlobalString(BootnodesFlag.Name), GasPrice: common.String2Big(ctx.GlobalString(GasPriceFlag.Name)), SolcPath: ctx.GlobalString(SolcPathFlag.Name), + AutoDAG: ctx.GlobalBool(AutoDAGFlag.Name) || ctx.GlobalBool(MiningEnabledFlag.Name), } } -- cgit v1.2.3