Query: LastHeight -> Height :)

This commit is contained in:
Ethan Buchman
2017-02-17 09:39:41 -05:00
parent 67cf948f26
commit e4ec1a651f
5 changed files with 13 additions and 16 deletions
+2 -1
View File
@@ -433,11 +433,12 @@ func verifyCommit(chainState BlockchainState, header *tm.Header, commit *tm.Comm
chainID := chainState.ChainID
vals := chainState.Validators
valSet := tm.NewValidatorSet(vals)
blockID := commit.Precommits[0].BlockID // XXX: incorrect
// NOTE: Currently this only works with the exact same validator set.
// Not this, but perhaps "ValidatorSet.VerifyCommitAny" should expose
// the functionality to verify commits even after validator changes.
blockID, err := valSet.VerifyCommitReturnBlockID(chainID, header.Height, commit)
err := valSet.VerifyCommit(chainID, blockID, header.Height, commit)
if err != nil {
return err
}