diff options
author | zelig <viktor.tron@gmail.com> | 2015-05-20 23:56:17 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-05-21 22:53:42 +0800 |
commit | bed80133e0573ebeefa201a15b20188198adf0ac (patch) | |
tree | a654c1c6c671a9599290a08de2b4db95385465a1 /cmd/utils/flags.go | |
parent | 90b672f1af50944e136bdd6e617fad90f59fe6fe (diff) | |
download | dexon-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.go | 5 |
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), } } |