diff options
Diffstat (limited to 'dex')
-rw-r--r-- | dex/backend.go | 8 | ||||
-rw-r--r-- | dex/config.go | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/dex/backend.go b/dex/backend.go index 897807097..78af8b41a 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()) diff --git a/dex/config.go b/dex/config.go index 5fa7d87e8..404be2fb0 100644 --- a/dex/config.go +++ b/dex/config.go @@ -114,4 +114,7 @@ type Config struct { EWASMInterpreter string // Type of the EVM interpreter ("" for default) EVMInterpreter string + + // Dexon options + DMoment int64 } |