forked from CovenantSQL/CovenantSQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbaseaccount_gen.go
More file actions
32 lines (28 loc) · 829 Bytes
/
Copy pathbaseaccount_gen.go
File metadata and controls
32 lines (28 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package types
// Code generated by github.com/CovenantSQL/HashStablePack DO NOT EDIT.
import (
hsp "github.com/CovenantSQL/HashStablePack/marshalhash"
)
// MarshalHash marshals for hash
func (z *BaseAccount) MarshalHash() (o []byte, err error) {
var b []byte
o = hsp.Require(b, z.Msgsize())
// map header, size 2
o = append(o, 0x82)
if oTemp, err := z.Account.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
if oTemp, err := z.TransactionTypeMixin.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
return
}
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z *BaseAccount) Msgsize() (s int) {
s = 1 + 8 + z.Account.Msgsize() + 21 + z.TransactionTypeMixin.Msgsize()
return
}