@@ -130,7 +130,7 @@ func (d *Data) MarshalBinary() ([]byte, error) {
130130 pm .ChainId = d .Metadata .ChainID
131131 pm .Height = d .Metadata .Height
132132 pm .Time = d .Metadata .Time
133- pm .LastDataHash = d .Metadata . LastDataHash
133+ pm .LastDataHash = d .LastDataHash
134134 pd .Metadata = pm
135135 defer func () {
136136 pm .Reset ()
@@ -222,22 +222,22 @@ func (sh *SignedHeader) FromProto(other *pb.SignedHeader) error {
222222func (sh * SignedHeader ) MarshalBinary () ([]byte , error ) {
223223 psh := pbSignedHeaderPool .Get ().(* pb.SignedHeader )
224224 psh .Reset ()
225-
225+
226226 // Reuse pooled pb.Header + pb.Version for the nested header.
227227 ph := pbHeaderPool .Get ().(* pb.Header )
228228 ph .Reset ()
229229 pv := pbVersionPool .Get ().(* pb.Version )
230- pv .Block , pv .App = sh .Header . Version .Block , sh . Header .Version .App
230+ pv .Block , pv .App = sh .Version .Block , sh .Version .App
231231 ph .Version = pv
232- ph .Height = sh .Header . BaseHeader .Height
233- ph .Time = sh .Header . BaseHeader .Time
234- ph .ChainId = sh .Header . BaseHeader .ChainID
235- ph .LastHeaderHash = sh .Header . LastHeaderHash
236- ph .DataHash = sh .Header . DataHash
237- ph .AppHash = sh .Header . AppHash
238- ph .ProposerAddress = sh .Header . ProposerAddress
239- ph .ValidatorHash = sh .Header . ValidatorHash
240- if unknown := encodeLegacyUnknownFields (sh .Header . Legacy ); len (unknown ) > 0 {
232+ ph .Height = sh .BaseHeader .Height
233+ ph .Time = sh .BaseHeader .Time
234+ ph .ChainId = sh .BaseHeader .ChainID
235+ ph .LastHeaderHash = sh .LastHeaderHash
236+ ph .DataHash = sh .DataHash
237+ ph .AppHash = sh .AppHash
238+ ph .ProposerAddress = sh .ProposerAddress
239+ ph .ValidatorHash = sh .ValidatorHash
240+ if unknown := encodeLegacyUnknownFields (sh .Legacy ); len (unknown ) > 0 {
241241 ph .ProtoReflect ().SetUnknown (unknown )
242242 }
243243 psh .Header = ph
@@ -491,7 +491,7 @@ func (d *Data) ToProto() *pb.Data {
491491 ChainId : d .Metadata .ChainID ,
492492 Height : d .Metadata .Height ,
493493 Time : d .Metadata .Time ,
494- LastDataHash : d .Metadata . LastDataHash [:],
494+ LastDataHash : d .LastDataHash [:],
495495 }
496496 }
497497 // Reinterpret Txs ([]Tx) as [][]byte without allocation.
0 commit comments