Versions in this module Expand all Collapse all v6 v6.4.0 May 18, 2020 Changes in this version + const DefaultPruneHeight + var ErrNodeNotExist = errors.New("ErrNodeNotExist") + func ClosePrune() + func DelKVPair(db dbm.DB, storeDel *types.StoreGet, treeCfg *TreeConfig) ([]byte, [][]byte, error) + func DelLeafCountKV(db dbm.DB, blockHeight int64, treeCfg *TreeConfig) error + func GetKVPair(db dbm.DB, storeGet *types.StoreGet, treeCfg *TreeConfig) ([][]byte, error) + func GetKVPairProof(db dbm.DB, roothash []byte, key []byte, treeCfg *TreeConfig) ([]byte, error) + func InitGlobalMem(treeCfg *TreeConfig) + func InnerNodeProofHash(childHash []byte, branch *types.InnerNode) []byte + func IterateRangeByStateHash(db dbm.DB, statehash, start, end []byte, ascending bool, treeCfg *TreeConfig, ...) + func LoadTree2MemDb(db dbm.DB, hash []byte, mp map[uint64]struct{}) + func PrintLeafNodeParent(db dbm.DB, key, hash []byte, height int64) + func PrintMemStats(height int64) + func PrintNode(node *Node) + func PrintNodeDb(db dbm.DB, hash []byte) + func PrintSameLeafKey(db dbm.DB, key string) + func PrintTreeLeaf(db dbm.DB, roothash []byte, treeCfg *TreeConfig) + func PruningTree(db dbm.DB, curHeight int64, treeCfg *TreeConfig) + func PruningTreePrintDB(db dbm.DB, prefix []byte) + func ReleaseGlobalMem() + func SetKVPair(db dbm.DB, storeSet *types.StoreSet, sync bool, treeCfg *TreeConfig) ([]byte, error) + func VerifyKVPairProof(db dbm.DB, roothash []byte, keyvalue types.KeyValue, proof []byte) bool + type MemTreeOpera interface + Add func(key, value interface{}) + Contains func(key interface{}) bool + Delete func(key interface{}) + Get func(key interface{}) (value interface{}, ok bool) + Len func() int + type Node struct + func MakeNode(buf []byte, t *Tree) (node *Node, err error) + func NewNode(key []byte, value []byte) *Node + func (node *Node) Hash(t *Tree) []byte + type Proof struct + InnerNodes []*types.InnerNode + LeafHash []byte + RootHash []byte + func ReadProof(roothash []byte, leafhash []byte, data []byte) (*Proof, error) + func (proof *Proof) Root() []byte + func (proof *Proof) Verify(key []byte, value []byte, root []byte) bool + type Tree struct + func NewTree(db dbm.DB, sync bool, treeCfg *TreeConfig) *Tree + func (t *Tree) ConstructProof(key []byte) (value []byte, proof *Proof) + func (t *Tree) Copy() *Tree + func (t *Tree) Get(key []byte) (index int32, value []byte, exists bool) + func (t *Tree) GetByIndex(index int32) (key []byte, value []byte) + func (t *Tree) GetHash(key []byte) (index int32, hash []byte, exists bool) + func (t *Tree) Has(key []byte) bool + func (t *Tree) Hash() []byte + func (t *Tree) Height() int32 + func (t *Tree) Iterate(fn func(key []byte, value []byte) bool) (stopped bool) + func (t *Tree) IterateRange(start, end []byte, ascending bool, fn func(key []byte, value []byte) bool) (stopped bool) + func (t *Tree) IterateRangeInclusive(start, end []byte, ascending bool, fn func(key, value []byte) bool) (stopped bool) + func (t *Tree) Load(hash []byte) (err error) + func (t *Tree) Proof(key []byte) (value []byte, proofBytes []byte, exists bool) + func (t *Tree) Remove(key []byte) (value []byte, removed bool) + func (t *Tree) RemoveLeafCountKey(height int64) + func (t *Tree) Save() []byte + func (t *Tree) Set(key []byte, value []byte) (updated bool) + func (t *Tree) SetBlockHeight(height int64) + func (t *Tree) Size() int32 + type TreeARC struct + func NewTreeARC(size int) *TreeARC + func (ta *TreeARC) Add(key, value interface{}) + func (ta *TreeARC) Contains(key interface{}) bool + func (ta *TreeARC) Delete(key interface{}) + func (ta *TreeARC) Get(key interface{}) (value interface{}, ok bool) + func (ta *TreeARC) Len() int + type TreeConfig struct + EnableMVCC bool + EnableMavlPrefix bool + EnableMavlPrune bool + EnableMemTree bool + EnableMemVal bool + PruneHeight int32 + TkCloseCacheLen int32 + type TreeMap struct + func NewTreeMap(size int) *TreeMap + func (tm *TreeMap) Add(key, value interface{}) + func (tm *TreeMap) Contains(key interface{}) bool + func (tm *TreeMap) Delete(key interface{}) + func (tm *TreeMap) Get(key interface{}) (value interface{}, ok bool) + func (tm *TreeMap) Len() int Other modules containing this package github.com/33cn/chain33