Documentation ¶
Index ¶
- func HandleEth1DataSlice(val []*ethpb.Eth1Data, indices []uint64, convertAll bool) ([][32]byte, error)
- type FieldTrie
- func (f *FieldTrie) CopyTrie() *FieldTrie
- func (f *FieldTrie) Empty() bool
- func (f *FieldTrie) FieldReference() *stateutil.Reference
- func (f *FieldTrie) InsertFieldLayer(layer [][]*[32]byte)
- func (f *FieldTrie) RecomputeTrie(indices []uint64, elements interface{}) ([32]byte, error)
- func (f *FieldTrie) TrieRoot() ([32]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FieldTrie ¶
FieldTrie is the representation of the representative trie of the particular field.
func NewFieldTrie ¶
func NewFieldTrie(field types.FieldIndex, dataType types.DataType, elements interface{}, length uint64) (*FieldTrie, error)
NewFieldTrie is the constructor for the field trie data structure. It creates the corresponding trie according to the given parameters. Depending on whether the field is a basic/composite array which is either fixed/variable length, it will appropriately determine the trie.
func (*FieldTrie) FieldReference ¶
FieldReference returns the underlying field reference object for the trie.
func (*FieldTrie) InsertFieldLayer ¶
InsertFieldLayer manually inserts a field layer. This method bypasses the normal method of field computation, it is only meant to be used in tests.
func (*FieldTrie) RecomputeTrie ¶
RecomputeTrie rebuilds the affected branches in the trie according to the provided changed indices and elements. This recomputes the trie according to the particular field the trie is based on.