Documentation ¶
Index ¶
- type TreeStore
- func (store *TreeStore) Commit() (common.Hash, error)
- func (store *TreeStore) Copy() (*TreeStore, error)
- func (store *TreeStore) Delete(key common.Bytes) (deleted bool)
- func (store *TreeStore) Get(key common.Bytes) common.Bytes
- func (store *TreeStore) GetDB() database.Database
- func (store *TreeStore) ProveVCP(vcpKey []byte, vp *core.VCPProof) error
- func (store *TreeStore) Prune(cb func(n []byte) bool) error
- func (store *TreeStore) Revert(root common.Hash) (*TreeStore, error)
- func (store *TreeStore) Set(key, value common.Bytes)
- func (store *TreeStore) Traverse(prefix common.Bytes, cb func(k, v common.Bytes) bool) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TreeStore ¶
func NewTreeStore ¶
NewTreeStore create a new instance of TreeStore.
func (*TreeStore) Revert ¶
Revert creates a copy of the Trie with the given root, using the in-memory trie DB (i.e. store.Trie.GetDB()) of the current Trie. Note: Each time we call Trie.Commit() a new root node will be created, however, the older roots are still stored in the in-memory trie DB. The root passed to the Revert() function needs to be one of the previous roots, otherwise the function will return an error.
Click to show internal directories.
Click to hide internal directories.