From 7838d750e10bc1d1a21835a4f31cb935115e85cf Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Fri, 13 Mar 2020 09:58:53 -0400 Subject: [PATCH] Update godoc --- types/codec.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/codec.go b/types/codec.go index 6f7d03e5c9..21cd269043 100644 --- a/types/codec.go +++ b/types/codec.go @@ -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)