aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-05-20 23:56:17 +0800
committerzelig <viktor.tron@gmail.com>2015-05-21 22:53:42 +0800
commitbed80133e0573ebeefa201a15b20188198adf0ac (patch)
treea654c1c6c671a9599290a08de2b4db95385465a1 /cmd/utils/flags.go
parent90b672f1af50944e136bdd6e617fad90f59fe6fe (diff)
downloaddexon-bed80133e0573ebeefa201a15b20188198adf0ac.tar.gz
dexon-bed80133e0573ebeefa201a15b20188198adf0ac.tar.zst
dexon-bed80133e0573ebeefa201a15b20188198adf0ac.zip
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
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go5
1 files changed, 5 insertions, 0 deletions
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),
}
}