aboutsummaryrefslogtreecommitdiffstats
path: root/dex/backend.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-01-14 19:59:57 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:21 +0800
commit2b03b31d46e166e70ea82b806db47bb6408282e3 (patch)
tree9f26d62978a5de14078d7e50ddb6714c8996533a /dex/backend.go
parentdca26d3e73ea1657cb7daa2086b74250adbbd85f (diff)
downloadgo-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar
go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.gz
go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.bz2
go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.lz
go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.xz
go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.zst
go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.zip
params: write dMoment into ChainConfig (#150)
Diffstat (limited to 'dex/backend.go')
-rw-r--r--dex/backend.go7
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
}