diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-04-15 11:11:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-15 11:11:28 +0800 |
commit | 7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6 (patch) | |
tree | e3e79a5d19440647b3a74935bf07522fc8beb64e | |
parent | 1f5977b95eea8d5c609a9e7585229d204e92f86e (diff) | |
download | dexon-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar dexon-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar.gz dexon-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar.bz2 dexon-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar.lz dexon-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar.xz dexon-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.tar.zst dexon-consensus-7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6.zip |
core: fix rebroadcast anti nack complaint (#570)
-rw-r--r-- | core/dkg-tsig-protocol.go | 7 |
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 } |