OSDN Git Service
(root)
/
bytom
/
vapor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c748b38
)
Fix consensus msg sync bugs
consensus_sync
author
Yahtoo Ma
<yahtoo.ma@gmail.com>
Mon, 10 Jun 2019 08:56:45 +0000
(16:56 +0800)
committer
Yahtoo Ma
<yahtoo.ma@gmail.com>
Mon, 10 Jun 2019 08:56:45 +0000
(16:56 +0800)
fix peer status update error
fix block signature mark error
netsync/consensusmgr/handle.go
patch
|
blob
|
history
diff --git
a/netsync/consensusmgr/handle.go
b/netsync/consensusmgr/handle.go
index
66fddd9
..
bf21b6f
100644
(file)
--- 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() {