From: yahtoo Date: Mon, 10 Jun 2019 09:27:51 +0000 (+0800) Subject: Fix consensus msg sync bugs (#150) X-Git-Tag: v1.0.5~208^2~51 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4e067452cfa2762277b4e815a1deb63141e33c2d;p=bytom%2Fvapor.git Fix consensus msg sync bugs (#150) fix peer status update error fix block signature mark error --- diff --git a/netsync/consensusmgr/handle.go b/netsync/consensusmgr/handle.go index 66fddd9e..bf21b6fa 100644 --- a/netsync/consensusmgr/handle.go +++ b/netsync/consensusmgr/handle.go @@ -91,6 +91,7 @@ func (m *Manager) handleBlockProposeMsg(peerID string, msg *BlockProposeMsg) { hash := block.Hash() m.peers.MarkBlock(peerID, &hash) m.blockFetcher.processNewBlock(&blockMsg{peerID: peerID, block: block}) + m.peers.SetStatus(peerID, block.Height, &hash) } func (m *Manager) handleBlockSignatureMsg(peerID string, msg *BlockSignatureMsg) { @@ -99,6 +100,7 @@ func (m *Manager) handleBlockSignatureMsg(peerID string, msg *BlockSignatureMsg) m.peers.ProcessIllegal(peerID, security.LevelMsgIllegal, err.Error()) return } + m.peers.MarkBlockSignature(peerID, msg.Signature) } func (m *Manager) blockProposeMsgBroadcastLoop() {