remove LastCommitHeight

This commit is contained in:
Ethan Buchman
2016-11-16 20:58:53 -05:00
parent a3d863f83b
commit d7f6c0775a
3 changed files with 19 additions and 35 deletions

View File

@ -1522,7 +1522,8 @@ func (cs *ConsensusState) signVote(type_ byte, hash []byte, header types.PartSet
// sign the vote and publish on internalMsgQueue
func (cs *ConsensusState) signAddVote(type_ byte, hash []byte, header types.PartSetHeader) *types.Vote {
if cs.privValidator == nil || !cs.Validators.HasAddress(cs.privValidator.GetAddress()) {
// if we don't have a key or we're not in the validator set, do nothing
if cs.privValidator == nil || cs.privValidatorIndex < 0 {
return nil
}
vote, err := cs.signVote(type_, hash, header)