aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-01-14 19:59:57 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 13:50:01 +0800
commitec4a5ce9483348a16bdbf6ca06e5b6d69c7d9596 (patch)
tree31a1099d447e579683e44830d540dfd690194f29 /cmd
parent3994913191e2198b441dd3916c50f3c692fe5fce (diff)
downloaddexon-ec4a5ce9483348a16bdbf6ca06e5b6d69c7d9596.tar
dexon-ec4a5ce9483348a16bdbf6ca06e5b6d69c7d9596.tar.gz
dexon-ec4a5ce9483348a16bdbf6ca06e5b6d69c7d9596.tar.bz2
dexon-ec4a5ce9483348a16bdbf6ca06e5b6d69c7d9596.tar.lz
dexon-ec4a5ce9483348a16bdbf6ca06e5b6d69c7d9596.tar.xz
dexon-ec4a5ce9483348a16bdbf6ca06e5b6d69c7d9596.tar.zst
dexon-ec4a5ce9483348a16bdbf6ca06e5b6d69c7d9596.zip
params: write dMoment into ChainConfig (#150)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gdex/main.go1
-rw-r--r--cmd/utils/flags.go14
2 files changed, 0 insertions, 15 deletions
diff --git a/cmd/gdex/main.go b/cmd/gdex/main.go
index 5fb5b5d8f..19329c4ea 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)