From f1dc5811c33462867b0b1ab58f4c3c86b225b5be Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Wed, 21 Sep 2022 21:29:24 -0400 Subject: [PATCH] Sync Vote.Verify() in spec with implementation (#9466) --- spec/core/data_structures.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/core/data_structures.md b/spec/core/data_structures.md index a3d1a4de700..1e8ad8b2515 100644 --- a/spec/core/data_structures.md +++ b/spec/core/data_structures.md @@ -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