This commit is contained in:
Ethan Buchman
2017-06-23 22:12:45 -04:00
parent 2750343de5
commit 468982ffe4
4 changed files with 15 additions and 18 deletions
-3
View File
@@ -104,9 +104,6 @@ func (cs *ConsensusState) catchupReplay(csHeight int) error {
// NOTE: This is just a sanity check. As far as we know things work fine without it,
// and Handshake could reuse ConsensusState if it weren't for this check (since we can crash after writing ENDHEIGHT).
gr, found, err := cs.wal.group.Search("#ENDHEIGHT: ", makeHeightSearchFunc(csHeight))
if err != nil {
return err
}
if gr != nil {
gr.Close()
}
+1 -1
View File
@@ -648,7 +648,7 @@ func (cs *ConsensusState) handleMsg(mi msgInfo, rs RoundState) {
case *VoteMessage:
// attempt to add the vote and dupeout the validator if its a duplicate signature
// if the vote gives us a 2/3-any or 2/3-one, we transition
_ = cs.tryAddVote(msg.Vote, peerKey)
err := cs.tryAddVote(msg.Vote, peerKey)
if err == ErrAddingVote {
// TODO: punish peer
}