mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 13:05:09 +00:00
types: more test cases for TestValidatorSet_VerifyCommit (#5018)
Refs #4926
This commit is contained in:
@@ -763,10 +763,15 @@ func (commit *Commit) GetVote(valIdx int32) *Vote {
|
||||
}
|
||||
}
|
||||
|
||||
// VoteSignBytes constructs the SignBytes for the given CommitSig.
|
||||
// The only unique part of the SignBytes is the Timestamp - all other fields
|
||||
// signed over are otherwise the same for all validators.
|
||||
// VoteSignBytes returns the bytes of the Vote corresponding to valIdx for
|
||||
// signing.
|
||||
//
|
||||
// The only unique part is the Timestamp - all other fields signed over are
|
||||
// otherwise the same for all validators.
|
||||
//
|
||||
// Panics if valIdx >= commit.Size().
|
||||
//
|
||||
// See VoteSignBytes
|
||||
func (commit *Commit) VoteSignBytes(chainID string, valIdx int32) []byte {
|
||||
v := commit.GetVote(valIdx).ToProto()
|
||||
return VoteSignBytes(chainID, v)
|
||||
|
||||
Reference in New Issue
Block a user