Avoid too fast block generation in single validator case.
Now node waits commitTimeout before next height if there is only one
validator.
@@ -667,7 +667,7 @@ func (cs *consensus) enterCommit(precommits *voteSet, partSetID *PartSetID, roun
logger.Printf("cs.enterCommit: %+v\n", err)
}
- if cs.consumedNonunicast {
+ if cs.consumedNonunicast || cs.validators.Len() == 1 {
cs.nextProposeTime = time.Now().Add(timeoutCommit)
} else {
cs.nextProposeTime = time.Now()
