MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / MarshalHash

Method MarshalHash

types/block_gen.go:210–226  ·  view source on GitHub ↗

MarshalHash marshals for hash

()

Source from the content-addressed store, hash-verified

208
209// MarshalHash marshals for hash
210func (z *SignedHeader) MarshalHash() (o []byte, err error) {
211 var b []byte
212 o = hsp.Require(b, z.Msgsize())
213 // map header, size 2
214 o = append(o, 0x82)
215 if oTemp, err := z.HSV.MarshalHash(); err != nil {
216 return nil, err
217 } else {
218 o = hsp.AppendBytes(o, oTemp)
219 }
220 if oTemp, err := z.Header.MarshalHash(); err != nil {
221 return nil, err
222 } else {
223 o = hsp.AppendBytes(o, oTemp)
224 }
225 return
226}
227
228// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
229func (z *SignedHeader) Msgsize() (s int) {

Calls 2

MsgsizeMethod · 0.95
MarshalHashMethod · 0.65