From 2a7f09dd847174ef6f4b1fd6be170bc64065879e Mon Sep 17 00:00:00 2001
From: Jae Kwon <jae@tendermint.com>
Date: Fri, 1 Jan 2016 18:30:13 -0800
Subject: [PATCH] Patch in fix of height-vote-set

---
 .../tendermint/tendermint/consensus/height_vote_set.go         | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Godeps/_workspace/src/github.com/tendermint/tendermint/consensus/height_vote_set.go b/Godeps/_workspace/src/github.com/tendermint/tendermint/consensus/height_vote_set.go
index 37e6ad62..1fff64ea 100644
--- a/Godeps/_workspace/src/github.com/tendermint/tendermint/consensus/height_vote_set.go
+++ b/Godeps/_workspace/src/github.com/tendermint/tendermint/consensus/height_vote_set.go
@@ -95,14 +95,15 @@ func (hvs *HeightVoteSet) AddByIndex(valIndex int, vote *types.Vote, peerKey str
 	if voteSet == nil {
 		if _, ok := hvs.peerCatchupRounds[peerKey]; !ok {
 			hvs.addRound(vote.Round)
+			voteSet = hvs.getVoteSet(vote.Round, vote.Type)
 			hvs.peerCatchupRounds[peerKey] = vote.Round
 		} else {
 			// Peer has sent a vote that does not match our round,
 			// for more than one round.  Bad peer!
 			// TODO punish peer.
 			log.Warn("Deal with peer giving votes from unwanted rounds")
+			return
 		}
-		return
 	}
 	added, address, err = voteSet.AddByIndex(valIndex, vote)
 	return
-- 
GitLab