diff --git a/consensus/state.go b/consensus/state.go index 67c10517..52bc2ca0 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -476,8 +476,6 @@ func (cs *ConsensusState) reconstructLastCommit(state *sm.State) { if precommit == nil { continue } - // XXX reconstruct Vote from precommit after changing precommit to simpler - // structure. added, err := lastPrecommits.AddVote(precommit) if !added || err != nil { PanicCrisis(Fmt("Failed to reconstruct LastCommit: %v", err)) diff --git a/types/vote_set.go b/types/vote_set.go index d42301e0..e659571b 100644 --- a/types/vote_set.go +++ b/types/vote_set.go @@ -140,7 +140,7 @@ func (voteSet *VoteSet) addVote(vote *Vote) (added bool, err error) { panic("Validator index or address was not set in vote.") } - // Make sure the step matches. (or that vote is commit && round < voteSet.round) + // Make sure the step matches. if (vote.Height != voteSet.height) || (vote.Round != voteSet.round) || (vote.Type != voteSet.type_) { @@ -330,7 +330,7 @@ func (voteSet *VoteSet) BitArrayByBlockID(blockID BlockID) *BitArray { return nil } -// NOTE: if validator has conflicting votes, picks random. +// NOTE: if validator has conflicting votes, returns "canonical" vote func (voteSet *VoteSet) GetByIndex(valIndex int) *Vote { voteSet.mtx.Lock() defer voteSet.mtx.Unlock()