diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-12-04 10:10:17 +0800 |
---|---|---|
committer | Mission Liao <mission.liao@dexon.org> | 2018-12-04 10:10:17 +0800 |
commit | 0be7c830e4f96a7ae1a957c4bb12772447617076 (patch) | |
tree | 3cadafadf998446a01a322230c41c9d2f7527a5b /core/consensus.go | |
parent | 041eb53f043e6a4a7a9acab1ce46ecfd268fed57 (diff) | |
download | dexon-consensus-0be7c830e4f96a7ae1a957c4bb12772447617076.tar dexon-consensus-0be7c830e4f96a7ae1a957c4bb12772447617076.tar.gz dexon-consensus-0be7c830e4f96a7ae1a957c4bb12772447617076.tar.bz2 dexon-consensus-0be7c830e4f96a7ae1a957c4bb12772447617076.tar.lz dexon-consensus-0be7c830e4f96a7ae1a957c4bb12772447617076.tar.xz dexon-consensus-0be7c830e4f96a7ae1a957c4bb12772447617076.tar.zst dexon-consensus-0be7c830e4f96a7ae1a957c4bb12772447617076.zip |
core: Fix stuffs (#354)
- Add common.CustomLogger
- CRS will wait for DKG to finish
- Fix core.agreementMgr.processAgreementResult
Diffstat (limited to 'core/consensus.go')
-rw-r--r-- | core/consensus.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/consensus.go b/core/consensus.go index efd3ab7..a1aa072 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -611,6 +611,15 @@ func (con *Consensus) runCRS(round uint64) { con.logger.Info("CRS already proposed", "round", round+1) return } + con.logger.Debug("Calling Governance.IsDKGFinal to check if ready to run CRS", + "round", round) + for !con.gov.IsDKGFinal(round) { + con.logger.Debug("DKG is not ready for running CRS. Retry later...", + "round", round) + time.Sleep(500 * time.Millisecond) + } + // Wait some time for DKG to recover private share. + time.Sleep(100 * time.Millisecond) // Start running next round CRS. con.logger.Debug("Calling Governance.CRS", "round", round) psig, err := con.cfgModule.preparePartialSignature(round, con.gov.CRS(round)) |