From 839ceb043e844ba2b813d01a0452068a9407987e Mon Sep 17 00:00:00 2001 From: yahtoo Date: Tue, 16 Jul 2019 18:38:50 +0800 Subject: [PATCH] Prevent resending of received BlockSignatureMsg (#294) --- netsync/consensusmgr/handle.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netsync/consensusmgr/handle.go b/netsync/consensusmgr/handle.go index 702df720..ffb58714 100644 --- a/netsync/consensusmgr/handle.go +++ b/netsync/consensusmgr/handle.go @@ -95,12 +95,12 @@ func (m *Manager) handleBlockProposeMsg(peerID string, msg *BlockProposeMsg) { } func (m *Manager) handleBlockSignatureMsg(peerID string, msg *BlockSignatureMsg) { + m.peers.MarkBlockSignature(peerID, msg.Signature) blockHash := bc.NewHash(msg.BlockHash) if err := m.chain.ProcessBlockSignature(msg.Signature, msg.PubKey, &blockHash); err != nil { m.peers.ProcessIllegal(peerID, security.LevelMsgIllegal, err.Error()) return } - m.peers.MarkBlockSignature(peerID, msg.Signature) } func (m *Manager) blockProposeMsgBroadcastLoop() { -- 2.11.0