aboutsummaryrefslogtreecommitdiffstats
path: root/core/configuration-chain.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-12-14 20:56:24 +0800
committerGitHub <noreply@github.com>2018-12-14 20:56:24 +0800
commit5f32dc8d27564e1f3a105fd1dacf02130b08621a (patch)
treed2649afe0df27de2ec2eb84f4709a2c7699d3d22 /core/configuration-chain.go
parent155e31175aeaa3685c57383e386c6e62c46318ef (diff)
downloadtangerine-consensus-5f32dc8d27564e1f3a105fd1dacf02130b08621a.tar
tangerine-consensus-5f32dc8d27564e1f3a105fd1dacf02130b08621a.tar.gz
tangerine-consensus-5f32dc8d27564e1f3a105fd1dacf02130b08621a.tar.bz2
tangerine-consensus-5f32dc8d27564e1f3a105fd1dacf02130b08621a.tar.lz
tangerine-consensus-5f32dc8d27564e1f3a105fd1dacf02130b08621a.tar.xz
tangerine-consensus-5f32dc8d27564e1f3a105fd1dacf02130b08621a.tar.zst
tangerine-consensus-5f32dc8d27564e1f3a105fd1dacf02130b08621a.zip
core: Fix a bug of DKGNackComplaints (#370)
* core: Fix a bug if DKGNackComplaint is added after required time. * Duplicated NackComplaint should be only count once.
Diffstat (limited to 'core/configuration-chain.go')
-rw-r--r--core/configuration-chain.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/configuration-chain.go b/core/configuration-chain.go
index 364f2c7..3c2a4a9 100644
--- a/core/configuration-chain.go
+++ b/core/configuration-chain.go
@@ -153,7 +153,8 @@ func (cc *configurationChain) runDKG(round uint64) error {
cc.dkgLock.Lock()
// Phase 5(T = 2λ): Propose Anti nack complaint.
cc.logger.Debug("Calling Governance.DKGComplaints", "round", round)
- cc.dkg.processNackComplaints(cc.gov.DKGComplaints(round))
+ complaints := cc.gov.DKGComplaints(round)
+ cc.dkg.processNackComplaints(complaints)
cc.dkgLock.Unlock()
<-ticker.Tick()
cc.dkgLock.Lock()
@@ -163,8 +164,7 @@ func (cc *configurationChain) runDKG(round uint64) error {
<-ticker.Tick()
cc.dkgLock.Lock()
// Phase 7(T = 4λ): Enforce complaints and nack complaints.
- cc.logger.Debug("Calling Governance.DKGComplaints", "round", round)
- cc.dkg.enforceNackComplaints(cc.gov.DKGComplaints(round))
+ cc.dkg.enforceNackComplaints(complaints)
// Enforce complaint is done in `processPrivateShare`.
// Phase 8(T = 5λ): DKG finalize.
cc.dkgLock.Unlock()