Versions in this module Expand all Collapse all v1 v1.0.2 Aug 16, 2022 v1.0.1 Aug 8, 2022 Changes in this version + const LenOfChildrenNodes + const TagFullNode + const TagHashNode + const TagShortNode + const TagValueNode + func CopyBytes(b []byte) (copiedBytes []byte) + func Deserialize(hash []byte, r io.Reader, needFlags bool) (node, error) + func Sha256Key(bs []byte) []byte + type Database interface + BatchCommit func() error + BatchDelete func(key []byte) error + BatchPut func(key, value []byte) error + Compact func() error + Delete func(key []byte) error + Get func(key []byte) ([]byte, error) + Has func(key []byte) (bool, error) + NewBatch func() error + NewIterator func(prefix []byte) db.IIterator + type Iterator struct + Err error + Key []byte + Value []byte + func NewIterator(it NodeIterator) *Iterator + func (it *Iterator) Next() bool + type MemDatabase struct + func NewMemDatabase() *MemDatabase + func (db *MemDatabase) BatchPut(key []byte, value []byte) error + func (db *MemDatabase) Delete(key []byte) error + func (db *MemDatabase) Get(key []byte) ([]byte, error) + func (db *MemDatabase) Has(key []byte) (bool, error) + func (db *MemDatabase) ViewDB() + type NodeIterator interface + Error func() error + Hash func() common.Uint256 + Leaf func() bool + LeafBlob func() []byte + LeafKey func() []byte + Next func(bool) bool + Parent func() common.Uint256 + Path func() []byte + type RefCounts struct + func NewRefCounts(t *Trie, refCountTargetHeight, pruningTargetHeight uint32) (*RefCounts, error) + func (ref *RefCounts) ClearNeedReset() error + func (ref *RefCounts) Commit() error + func (ref *RefCounts) Compact() error + func (ref *RefCounts) CreateRefCounts(hash common.Uint256, inMemory, persistIntermediate bool) error + func (ref *RefCounts) LengthOfCounts() int + func (ref *RefCounts) NeedReset() (bool, error) + func (ref *RefCounts) NewBatch() error + func (ref *RefCounts) PersistNeedReset() error + func (ref *RefCounts) PersistPrunedHeights() error + func (ref *RefCounts) PersistRefCountHeights() error + func (ref *RefCounts) PersistRefCounts() error + func (ref *RefCounts) Prune(hash common.Uint256, inMemory bool) error + func (ref *RefCounts) RebuildRefCount() error + func (ref *RefCounts) RemoveAllRefCount() error + func (ref *RefCounts) SequentialPrune() error + func (ref *RefCounts) Verify(hash common.Uint256) error + type Sync struct + DataAvailable chan struct{} + func NewSync(root common.Uint256) *Sync + func (s *Sync) AddSubTrie(root common.Uint256, path []byte) + func (s *Sync) Commit(sdb db.IStore) error + func (s *Sync) Pending() int + func (s *Sync) Pop(max int) ([]common.Uint256, []int64) + func (s *Sync) Process(result SyncResult) error + func (s *Sync) Push(hashes []common.Uint256, prio int64) + type SyncPath []byte + type SyncResult struct + Data []byte + Hash common.Uint256 + type Trie struct + func New(hash common.Uint256, db Database) (*Trie, error) + func (t *Trie) Commit() (common.Uint256, error) + func (t *Trie) CommitTo(db Database) (common.Uint256, error) + func (t *Trie) Copy() *Trie + func (t *Trie) Delete(key []byte) + func (t *Trie) Get(key []byte) []byte + func (t *Trie) Hash() common.Uint256 + func (t *Trie) NewRefCounts(targetRefCountHeight, targetPruningHeight uint32) (*RefCounts, error) + func (t *Trie) NodeIterator(start []byte) NodeIterator + func (t *Trie) Reset() + func (t *Trie) TryDelete(key []byte) error + func (t *Trie) TryGet(key []byte) ([]byte, error) + func (t *Trie) TryTraverse(needPrint bool) error + func (t *Trie) TryUpdate(key, value []byte) error + func (t *Trie) Update(key, value []byte)