Documentation ¶
Index ¶
- type Trie
- func (t *Trie) Commit() []byte
- func (t *Trie) DecodeNode(hash []byte) (nodes2.Node, error)
- func (t *Trie) Del(key []byte) error
- func (t *Trie) GenerateProof(root nodes2.Node, key []byte) (storage.Storage, error)
- func (t *Trie) Get(key []byte) ([]byte, error)
- func (t *Trie) GetRootHash() ([]byte, error)
- func (t *Trie) Hash() []byte
- func (t *Trie) NodeHash(node nodes2.Node) []byte
- func (t *Trie) NodeRaw(node nodes2.Node, forHashing bool) interface{}
- func (t *Trie) Proof(key []byte) (storage.Storage, error)
- func (t *Trie) Put(key []byte, value []byte)
- func (t *Trie) SetRootHash(hash []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
func (*Trie) GenerateProof ¶
func (*Trie) GetRootHash ¶
GetRootHash retrieves the root hash from the Committer. If it's not present in memory, it tries to fetch from the key-value storage.
func (*Trie) Proof ¶
Proof returns the Merkle-proof associated with a node. An error is returned if the node is not found.
func (*Trie) SetRootHash ¶
SetRootHash saves the root hash in the Committer and also in the key-value storage.
Click to show internal directories.
Click to hide internal directories.