Update godoc

This commit is contained in:
Aleksandr Bezobchuk 2020-03-13 09:58:53 -04:00
parent 217cae2021
commit 7838d750e1
No known key found for this signature in database
GPG Key ID: 7DAC30FBD99879B0
1 changed files with 4 additions and 2 deletions

View File

@ -15,8 +15,10 @@ func RegisterCodec(cdc *codec.Codec) {
cdc.RegisterInterface((*Tx)(nil), nil)
}
// CanonicalSignBytes returns a canonical JSON encoding of a message that can be
// signed over.
// CanonicalSignBytes returns a canonical JSON encoding of a Proto message that
// can be signed over. The JSON encoding ensures all field names adhere to their
// Proto definition, default values are omitted, and follows the JSON Canonical
// Form.
func CanonicalSignBytes(m codec.ProtoMarshaler) ([]byte, error) {
jm := &jsonpb.Marshaler{EmitDefaults: false, OrigName: false}
buf := new(bytes.Buffer)