fixes from Frey's review

This commit is contained in:
Anton Kaliaev
2017-12-15 12:12:45 -06:00
parent 808b830942
commit 7f649ccf23
2 changed files with 27 additions and 23 deletions

View File

@ -76,19 +76,11 @@ func execBlockOnProxyApp(txEventPublisher types.TxEventPublisher, proxyAppConn p
}
proxyAppConn.SetResponseCallback(proxyCb)
// determine validators who did not sign last block
// determine which validators did not sign last block
absentVals := make([]int32, 0)
for valA, _ := range lastValidators.Validators {
found := false
for _, voteB := range block.LastCommit.Precommits {
valB := voteB.ValidatorIndex
if valA == valB {
found = true
break
}
}
if !found {
absentVals = append(absentVals, int32(valA))
for valI, vote := range block.LastCommit.Precommits {
if vote == nil {
absentVals = append(absentVals, int32(valI))
}
}