some comments and cleanup

This commit is contained in:
Ethan Buchman
2017-11-19 00:57:55 +00:00
parent df3f4de7c3
commit f7731d38f6
4 changed files with 40 additions and 31 deletions

View File

@ -1237,10 +1237,6 @@ func (cs *ConsensusState) finalizeCommit(height int64) {
fail.Fail() // XXX
// TODO: remove included evidence
// and persist remaining evidence
// ... is this the right spot? need to ensure we never lose evidence
// NewHeightStep!
cs.updateToState(stateCopy)
@ -1333,7 +1329,7 @@ func (cs *ConsensusState) tryAddVote(vote *types.Vote, peerKey string) error {
_, err := cs.addVote(vote, peerKey)
if err != nil {
// If the vote height is off, we'll just ignore it,
// But if it's a conflicting sig, broadcast evidence tx for slashing.
// But if it's a conflicting sig, add it to the cs.evpool.
// If it's otherwise invalid, punish peer.
if err == ErrVoteHeightMismatch {
return err