Documentation ¶
Index ¶
- type Forest
- func (f *Forest) Has(commit flow.StateCommitment) bool
- func (f *Forest) Parent(commit flow.StateCommitment) (flow.StateCommitment, bool)
- func (f *Forest) Paths(commit flow.StateCommitment) ([]ledger.Path, bool)
- func (f *Forest) Reset(finalized flow.StateCommitment)
- func (f *Forest) Save(tree *trie.MTrie, paths []ledger.Path, parent flow.StateCommitment)
- func (f *Forest) Tree(commit flow.StateCommitment) (*trie.MTrie, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Forest ¶
type Forest struct {
// contains filtered or unexported fields
}
Forest is a representation of multiple tries mapped by their state commitment hash.
func (*Forest) Has ¶
func (f *Forest) Has(commit flow.StateCommitment) bool
Has returns whether a state commitment matches one of the trees within the forest.
func (*Forest) Parent ¶
func (f *Forest) Parent(commit flow.StateCommitment) (flow.StateCommitment, bool)
Parent returns the parent of the given state commitment.
func (*Forest) Reset ¶
func (f *Forest) Reset(finalized flow.StateCommitment)
Reset deletes all tries that do not match the given state commitment.
Click to show internal directories.
Click to hide internal directories.