aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-04-15 11:11:28 +0800
committerGitHub <noreply@github.com>2019-04-15 11:11:28 +0800
commit7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6 (patch)
treee3e79a5d19440647b3a74935bf07522fc8beb64e
parent1f5977b95eea8d5c609a9e7585229d204e92f86e (diff)
downloadtangerine-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar
tangerine-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar.gz
tangerine-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar.bz2
tangerine-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar.lz
tangerine-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar.xz
tangerine-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar.zst
tangerine-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.zip
core: fix rebroadcast anti nack complaint (#570)
-rw-r--r--core/dkg-tsig-protocol.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/dkg-tsig-protocol.go b/core/dkg-tsig-protocol.go
index 0612bda..d81d485 100644
--- a/core/dkg-tsig-protocol.go
+++ b/core/dkg-tsig-protocol.go
@@ -487,10 +487,13 @@ func (d *dkgProtocol) processPrivateShare(
if _, exist := d.antiComplaintReceived[prvShare.ReceiverID]; !exist {
d.antiComplaintReceived[prvShare.ReceiverID] =
make(map[types.NodeID]struct{})
+ }
+ if _, exist :=
+ d.antiComplaintReceived[prvShare.ReceiverID][prvShare.ProposerID]; !exist {
d.recv.ProposeDKGAntiNackComplaint(prvShare)
+ d.antiComplaintReceived[prvShare.ReceiverID][prvShare.ProposerID] =
+ struct{}{}
}
- d.antiComplaintReceived[prvShare.ReceiverID][prvShare.ProposerID] =
- struct{}{}
}
return nil
}