MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / VoteSignBytes

Method VoteSignBytes

types/block.go:807–810  ·  view source on GitHub ↗

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

(chainID string, valIdx int32)

Source from the content-addressed store, hash-verified

805//
806// See VoteSignBytes
807func (commit *Commit) VoteSignBytes(chainID string, valIdx int32) []byte {
808 v := commit.GetVote(valIdx).ToProto()
809 return VoteSignBytes(chainID, v)
810}
811
812// Type returns the vote type of the commit, which is always VoteTypePrecommit
813// Implements VoteSetReader.

Callers 3

VerifyCommitMethod · 0.80
VerifyCommitLightMethod · 0.80

Calls 3

GetVoteMethod · 0.95
VoteSignBytesFunction · 0.85
ToProtoMethod · 0.45

Tested by

no test coverage detected