@ -253,7 +253,7 @@ func (conR *ConsensusReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte)
ps . ApplyProposalPOLMessage ( msg )
ps . ApplyProposalPOLMessage ( msg )
case * BlockPartMessage :
case * BlockPartMessage :
ps . SetHasProposalBlockPart ( msg . Height , msg . Round , msg . Part . Index )
ps . SetHasProposalBlockPart ( msg . Height , msg . Round , msg . Part . Index )
if numBlocks := ps . RecordBlockPart ( msg ) ; numBlocks == blocksToContributeToBecomeGoodPeer {
if numBlocks := ps . RecordBlockPart ( msg ) ; numBlocks % blocksToContributeToBecomeGoodPeer == 0 {
conR . Switch . MarkPeerAsGood ( src )
conR . Switch . MarkPeerAsGood ( src )
}
}
conR . conS . peerMsgQueue <- msgInfo { msg , src . ID ( ) }
conR . conS . peerMsgQueue <- msgInfo { msg , src . ID ( ) }
@ -275,7 +275,7 @@ func (conR *ConsensusReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte)
ps . EnsureVoteBitArrays ( height , valSize )
ps . EnsureVoteBitArrays ( height , valSize )
ps . EnsureVoteBitArrays ( height - 1 , lastCommitSize )
ps . EnsureVoteBitArrays ( height - 1 , lastCommitSize )
ps . SetHasVote ( msg . Vote )
ps . SetHasVote ( msg . Vote )
if blocks := ps . RecordVote ( msg . Vote ) ; blocks == blocksToContributeToBecomeGoodPeer {
if blocks := ps . RecordVote ( msg . Vote ) ; blocks % blocksToContributeToBecomeGoodPeer == 0 {
conR . Switch . MarkPeerAsGood ( src )
conR . Switch . MarkPeerAsGood ( src )
}
}