forked from ferranbt/fastssz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
case3_encoding.go
55 lines (44 loc) · 1.22 KB
/
case3_encoding.go
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
// Code generated by fastssz. DO NOT EDIT.
// Hash: 6490f11f815acc14fad304d8132c076222645a9159aca1f7cca2c6e0caa56b00
// Version: 0.1.3-dev
package other
import (
ssz "github.com/claravanstaden/fastssz"
)
// MarshalSSZ ssz marshals the Case3B object
func (c *Case3B) MarshalSSZ() ([]byte, error) {
return ssz.MarshalSSZ(c)
}
// MarshalSSZTo ssz marshals the Case3B object to a target array
func (c *Case3B) MarshalSSZTo(buf []byte) (dst []byte, err error) {
dst = buf
return
}
// UnmarshalSSZ ssz unmarshals the Case3B object
func (c *Case3B) UnmarshalSSZ(buf []byte) error {
var err error
size := uint64(len(buf))
if size != 0 {
return ssz.ErrSize
}
return err
}
// SizeSSZ returns the ssz encoded size in bytes for the Case3B object
func (c *Case3B) SizeSSZ() (size int) {
size = 0
return
}
// HashTreeRoot ssz hashes the Case3B object
func (c *Case3B) HashTreeRoot() ([32]byte, error) {
return ssz.HashWithDefaultHasher(c)
}
// HashTreeRootWith ssz hashes the Case3B object with a hasher
func (c *Case3B) HashTreeRootWith(hh ssz.HashWalker) (err error) {
indx := hh.Index()
hh.Merkleize(indx)
return
}
// GetTree ssz hashes the Case3B object
func (c *Case3B) GetTree() (*ssz.Node, error) {
return ssz.ProofTree(c)
}