diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-10-20 16:13:18 +0800 |
---|---|---|
committer | Wei-Ning Huang <aitjcize@gmail.com> | 2018-10-20 16:13:18 +0800 |
commit | a7aa061724d5bac52da2d473bbd6f7225716b943 (patch) | |
tree | 4b23130848e73587cc62b0af6f2b23ab6aad1277 | |
parent | 9fbe8f9e561a64429eb15431782eb4280d0ffbad (diff) | |
download | dexon-consensus-a7aa061724d5bac52da2d473bbd6f7225716b943.tar dexon-consensus-a7aa061724d5bac52da2d473bbd6f7225716b943.tar.gz dexon-consensus-a7aa061724d5bac52da2d473bbd6f7225716b943.tar.bz2 dexon-consensus-a7aa061724d5bac52da2d473bbd6f7225716b943.tar.lz dexon-consensus-a7aa061724d5bac52da2d473bbd6f7225716b943.tar.xz dexon-consensus-a7aa061724d5bac52da2d473bbd6f7225716b943.tar.zst dexon-consensus-a7aa061724d5bac52da2d473bbd6f7225716b943.zip |
Start Run() until dMoment. (#233)
-rw-r--r-- | core/consensus.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/consensus.go b/core/consensus.go index 2f46ec1..bdd35a2 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -344,6 +344,8 @@ func (con *Consensus) Run(initBlock *types.Block) { } con.logger.Debug("Calling Network.ReceiveChan") go con.processMsg(con.network.ReceiveChan()) + // Sleep until dMoment come. + time.Sleep(con.dMoment.Sub(time.Now().UTC())) con.cfgModule.registerDKG(con.round, int(con.currentConfig.DKGSetSize)/3+1) con.event.RegisterTime(con.dMoment.Add(con.currentConfig.RoundInterval/4), func(time.Time) { |