diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-01-14 19:59:57 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:21 +0800 |
commit | 2b03b31d46e166e70ea82b806db47bb6408282e3 (patch) | |
tree | 9f26d62978a5de14078d7e50ddb6714c8996533a /cmd | |
parent | dca26d3e73ea1657cb7daa2086b74250adbbd85f (diff) | |
download | go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.gz go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.zst go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.zip |
params: write dMoment into ChainConfig (#150)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gdex/main.go | 1 | ||||
-rw-r--r-- | cmd/utils/flags.go | 14 |
2 files changed, 0 insertions, 15 deletions
diff --git a/cmd/gdex/main.go b/cmd/gdex/main.go index 8e08e2d77..a2597c098 100644 --- a/cmd/gdex/main.go +++ b/cmd/gdex/main.go @@ -98,7 +98,6 @@ var ( utils.MaxPeersFlag, utils.MaxPendingPeersFlag, utils.BlockProposerEnabledFlag, - utils.ConsensusDMomentFlag, utils.MiningEnabledFlag, utils.MinerThreadsFlag, utils.MinerLegacyThreadsFlag, diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index bfe565c30..d26bbb065 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -326,10 +326,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", @@ -1288,16 +1284,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) |