VoteSignBytes returns the proto-encoding of the canonicalized Vote, for signing. Panics is the marshaling fails. The encoded Protobuf message is varint length-prefixed (using MarshalDelimited) for backwards-compatibility with the Amino encoding, due to e.g. hardware devices that rely on this encodi
(chainID string, vote *tmproto.Vote)
| 91 | // |
| 92 | // See CanonicalizeVote |
| 93 | func VoteSignBytes(chainID string, vote *tmproto.Vote) []byte { |
| 94 | pb := CanonicalizeVote(chainID, vote) |
| 95 | bz, err := protoio.MarshalDelimited(&pb) |
| 96 | if err != nil { |
| 97 | panic(err) |
| 98 | } |
| 99 | |
| 100 | return bz |
| 101 | } |
| 102 | |
| 103 | func (vote *Vote) Copy() *Vote { |
| 104 | voteCopy := *vote |