protect ourselves again underflow (Refs #911)

This commit is contained in:
Anton Kaliaev
2017-11-30 19:28:43 -06:00
committed by Ethan Buchman
parent 86af889dfb
commit f1fbf995f7
3 changed files with 15 additions and 4 deletions

View File

@@ -697,6 +697,7 @@ func (cs *ConsensusState) enterNewRound(height uint64, round int) {
// needProofBlock returns true on the first height (so the genesis app hash is signed right away)
// and where the last block (height-1) caused the app hash to change
// CONTRACT: height > 0
func (cs *ConsensusState) needProofBlock(height uint64) bool {
if height == 1 {
return true