Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SliceStruct ¶
type SliceStruct[E any] interface { Add(E) Get(int) E Set(int, E) Length() int ForEach(func(int, E) bool) bool Clone() SliceStruct[E] // Returns a new SliceStruct with exactly the same elements CloneDeep(func(E) E) SliceStruct[E] // Returns a new SliceStruct with every element of the old SliceStruct cloned using provided function ContainsBy(func(E) bool) bool Find(func(E) bool) (E, bool) }
Putting slice into a map is not acceptable as if you want to append to slice, you'll have to re-include the appended slice into the map.
func NewSliceStruct ¶
func NewSliceStruct[E any](elems ...E) SliceStruct[E]
func NewSliceStructLength ¶
func NewSliceStructLength[E any](length int) SliceStruct[E]
func NewSliceStructLengthCapacity ¶
func NewSliceStructLengthCapacity[E any](length, capacity int) SliceStruct[E]
type SnapshotInfo ¶
type SnapshotInfo interface { GetStateIndex() uint32 GetCommitment() *state.L1Commitment GetTrieRoot() trie.Hash GetBlockHash() state.BlockHash String() string Equals(SnapshotInfo) bool }
func NewSnapshotInfo ¶
func NewSnapshotInfo(index uint32, commitment *state.L1Commitment) SnapshotInfo
type SnapshotManager ¶
type SnapshotManager interface { UpdateAsync() BlockCommittedAsync(SnapshotInfo) SnapshotExists(uint32, *state.L1Commitment) bool LoadSnapshotAsync(SnapshotInfo) <-chan error }
type SnapshotManagerTest ¶
type SnapshotManagerTest interface { SnapshotManager SnapshotReady(SnapshotInfo) IsSnapshotReady(SnapshotInfo) bool SetAfterSnapshotCreated(func(SnapshotInfo)) }
func NewEmptySnapshotManager ¶
func NewEmptySnapshotManager() SnapshotManagerTest
Click to show internal directories.
Click to hide internal directories.