Sync Vote.Verify() in spec with implementation (#9466) (#9477)

This commit is contained in:
mergify[bot]
2022-09-21 22:35:01 -04:00
committed by GitHub
parent 95a7cc14cc
commit 7e05d43b60

View File

@@ -269,8 +269,8 @@ func (vote *Vote) Verify(chainID string, pubKey crypto.PubKey) error {
if !bytes.Equal(pubKey.Address(), vote.ValidatorAddress) {
return ErrVoteInvalidValidatorAddress
}
if !pubKey.VerifyBytes(types.VoteSignBytes(chainID), vote.Signature) {
v := vote.ToProto()
if !pubKey.VerifyBytes(types.VoteSignBytes(chainID, v), vote.Signature) {
return ErrVoteInvalidSignature
}
return nil