aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-01-14 19:59:57 +0800
committerGitHub <noreply@github.com>2019-01-14 19:59:57 +0800
commit5823540202423aed2cbdf8c125e95d8b1a20e245 (patch)
treeca6bc0f54e7fe5533b8bfad0c6a4b8f92064afbb /cmd/utils/flags.go
parent16c11a809e8bdc047dca151821cd1542c81624f2 (diff)
downloaddexon-5823540202423aed2cbdf8c125e95d8b1a20e245.tar
dexon-5823540202423aed2cbdf8c125e95d8b1a20e245.tar.gz
dexon-5823540202423aed2cbdf8c125e95d8b1a20e245.tar.bz2
dexon-5823540202423aed2cbdf8c125e95d8b1a20e245.tar.lz
dexon-5823540202423aed2cbdf8c125e95d8b1a20e245.tar.xz
dexon-5823540202423aed2cbdf8c125e95d8b1a20e245.tar.zst
dexon-5823540202423aed2cbdf8c125e95d8b1a20e245.zip
params: write dMoment into ChainConfig (#150)
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index fec073890..d7402b035 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -325,10 +325,6 @@ var (
Name: "bp",
Usage: "Enable block proposer mode (node set)",
}
- ConsensusDMomentFlag = cli.Uint64Flag{
- Name: "dmoment",
- Usage: "Set the DMoment of DEXON Consensus (unix timestamp)",
- }
// Miner settings
MiningEnabledFlag = cli.BoolFlag{
Name: "mine",
@@ -1280,16 +1276,6 @@ func SetDexConfig(ctx *cli.Context, stack *node.Node, cfg *dex.Config) {
if gen := ctx.GlobalInt(TrieCacheGenFlag.Name); gen > 0 {
state.MaxTrieCacheGen = uint16(gen)
}
- if ctx.GlobalIsSet(ConsensusDMomentFlag.Name) {
- cfg.DMoment = int64(ctx.GlobalUint64(ConsensusDMomentFlag.Name))
- } else {
- // TODO(jimmy): default DMoment should be set based on networkId.
- now := time.Now()
- cfg.DMoment = time.Date(
- now.Year(), now.Month(), now.Day(),
- now.Hour(), now.Minute(), (now.Second()/5+1)*5,
- 0, now.Location()).Unix()
- }
// Set indexer config.
setIndexerConfig(ctx, cfg)