-
Notifications
You must be signed in to change notification settings - Fork 146
Expand file tree
/
Copy pathcreatedb_gen.go
More file actions
74 lines (68 loc) · 2.08 KB
/
createdb_gen.go
File metadata and controls
74 lines (68 loc) · 2.08 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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 *CreateDatabase) MarshalHash() (o []byte, err error) {
var b []byte
o = hsp.Require(b, z.Msgsize())
// map header, size 3
o = append(o, 0x83)
if oTemp, err := z.CreateDatabaseHeader.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
if oTemp, err := z.DefaultHashSignVerifierImpl.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 *CreateDatabase) Msgsize() (s int) {
s = 1 + 21 + z.CreateDatabaseHeader.Msgsize() + 28 + z.DefaultHashSignVerifierImpl.Msgsize() + 21 + z.TransactionTypeMixin.Msgsize()
return
}
// MarshalHash marshals for hash
func (z *CreateDatabaseHeader) MarshalHash() (o []byte, err error) {
var b []byte
o = hsp.Require(b, z.Msgsize())
// map header, size 6
o = append(o, 0x86)
o = hsp.AppendUint64(o, z.AdvancePayment)
o = hsp.AppendUint64(o, z.GasPrice)
if oTemp, err := z.Nonce.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
if oTemp, err := z.Owner.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
if oTemp, err := z.ResourceMeta.MarshalHash(); err != nil {
return nil, err
} else {
o = hsp.AppendBytes(o, oTemp)
}
if oTemp, err := z.TokenType.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 *CreateDatabaseHeader) Msgsize() (s int) {
s = 1 + 15 + hsp.Uint64Size + 9 + hsp.Uint64Size + 6 + z.Nonce.Msgsize() + 6 + z.Owner.Msgsize() + 13 + z.ResourceMeta.Msgsize() + 10 + z.TokenType.Msgsize()
return
}