diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-01-14 19:59:57 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:56 +0800 |
commit | 3fcb8b6825b3c62c9890a5ca59594f1503e66893 (patch) | |
tree | abdf747d608dfd9079290db404148bd1944c969a /dex/backend.go | |
parent | 723d86122198314589d98f59b0176d60d2d5c878 (diff) | |
download | dexon-3fcb8b6825b3c62c9890a5ca59594f1503e66893.tar dexon-3fcb8b6825b3c62c9890a5ca59594f1503e66893.tar.gz dexon-3fcb8b6825b3c62c9890a5ca59594f1503e66893.tar.bz2 dexon-3fcb8b6825b3c62c9890a5ca59594f1503e66893.tar.lz dexon-3fcb8b6825b3c62c9890a5ca59594f1503e66893.tar.xz dexon-3fcb8b6825b3c62c9890a5ca59594f1503e66893.tar.zst dexon-3fcb8b6825b3c62c9890a5ca59594f1503e66893.zip |
params: write dMoment into ChainConfig (#150)
Diffstat (limited to 'dex/backend.go')
-rw-r--r-- | dex/backend.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/dex/backend.go b/dex/backend.go index 88cfa3033..c75fdfa29 100644 --- a/dex/backend.go +++ b/dex/backend.go @@ -162,8 +162,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) { // Set config fetcher so engine can fetch current system configuration from state. engine.SetGovStateFetcher(dex.governance) - dMoment := time.Unix(config.DMoment, int64(0)) - log.Info("DEXON Consensus DMoment", "time", dMoment) + dMoment := time.Unix(int64(chainConfig.DMoment), 0) // Force starting with full sync mode if this node is a bootstrap proposer. if config.BlockProposerEnabled && dMoment.After(time.Now()) { @@ -171,8 +170,8 @@ func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) { } pm, err := NewProtocolManager(dex.chainConfig, config.SyncMode, - config.NetworkId, dex.eventMux, dex.txPool, dex.engine, dex.blockchain, - chainDb, config.BlockProposerEnabled, dex.governance, dex.app) + config.NetworkId, chainConfig.DMoment, dex.eventMux, dex.txPool, dex.engine, + dex.blockchain, chainDb, config.BlockProposerEnabled, dex.governance, dex.app) if err != nil { return nil, err } |