diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-12-13 10:45:29 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:54 +0800 |
commit | bffc4410c72dbe2b9461ef78867f972f939a95a4 (patch) | |
tree | feda6cff67ff8e7ae2784fddd3804255c73d1b2c /dex/backend.go | |
parent | 002cabe12c347971e9d9d31f0f5759d5588431f0 (diff) | |
download | dexon-bffc4410c72dbe2b9461ef78867f972f939a95a4.tar dexon-bffc4410c72dbe2b9461ef78867f972f939a95a4.tar.gz dexon-bffc4410c72dbe2b9461ef78867f972f939a95a4.tar.bz2 dexon-bffc4410c72dbe2b9461ef78867f972f939a95a4.tar.lz dexon-bffc4410c72dbe2b9461ef78867f972f939a95a4.tar.xz dexon-bffc4410c72dbe2b9461ef78867f972f939a95a4.tar.zst dexon-bffc4410c72dbe2b9461ef78867f972f939a95a4.zip |
dex, cmd: Add DMoment to command line (#87)
Diffstat (limited to 'dex/backend.go')
-rw-r--r-- | dex/backend.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/dex/backend.go b/dex/backend.go index 8153dc2ed..5ea30b1a9 100644 --- a/dex/backend.go +++ b/dex/backend.go @@ -166,12 +166,8 @@ func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) { privKey := coreEcdsa.NewPrivateKeyFromECDSA(config.PrivateKey) - // TODO(w): set this correctly in config. - now := time.Now() - dMoment := time.Date( - now.Year(), now.Month(), now.Day(), - now.Hour(), now.Minute(), (now.Second()/5+1)*5, - 0, now.Location()) + dMoment := time.Unix(config.DMoment, int64(0)) + log.Info("DEXON Consensus DMoment", "time", dMoment) dex.consensus = dexCore.NewConsensus(dMoment, dex.app, dex.governance, blockdb.NewDatabase(chainDb), dex.network, privKey, log.Root()) |