From 7abe09214fbf04f9f1f7f4f6ec57cd1f924953d6 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Mon, 15 Apr 2019 11:11:28 +0800 Subject: core: fix rebroadcast anti nack complaint (#570) --- core/dkg-tsig-protocol.go | 7 +++++-- 1 file 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 } -- cgit v1.2.3