more VoteSet tests.

This commit is contained in:
omni
2014-10-15 23:55:52 -07:00
parent c5d9a93cbe
commit 300f12dd63
2 changed files with 166 additions and 13 deletions

View File

@ -51,6 +51,7 @@ func NewVoteSet(height uint32, round uint16, type_ byte, vset *ValidatorSet) *Vo
// True if added, false if not.
// Returns ErrVote[UnexpectedPhase|InvalidAccount|InvalidSignature|InvalidBlockHash|ConflictingSignature]
// NOTE: vote should be mutated after adding.
func (vs *VoteSet) Add(vote *Vote) (bool, error) {
vs.mtx.Lock()
defer vs.mtx.Unlock()