types: more test cases for TestValidatorSet_VerifyCommit (#5018)

Refs #4926
This commit is contained in:
Anton Kaliaev
2020-06-19 14:09:41 +04:00
committed by GitHub
parent 65d4506fea
commit 8b4a30fada
6 changed files with 305 additions and 354 deletions

View File

@@ -82,8 +82,12 @@ func (vote *Vote) CommitSig() CommitSig {
}
}
//VoteSignBytes take the chainID & a vote, represented in protobuf, and creates a signature.
// If any error arises this will panic
// VoteSignBytes returns the proto-encoding of the canonicalized Vote, for
// signing.
//
// Panics if the marshaling fails.
//
// See CanonicalizeVote
func VoteSignBytes(chainID string, vote *tmproto.Vote) []byte {
pb := CanonicalizeVote(chainID, vote)
bz, err := protoio.MarshalDelimited(&pb)