Versions in this module Expand all Collapse all v0 v0.6.1 Jan 21, 2020 Changes in this version + var EMPTY_HASH = common.Uint256 + type CompactMerkleTree struct + func NewTree(tree_size uint32, hashes []common.Uint256, store HashStore) *CompactMerkleTree + func (self *CompactMerkleTree) Append(leafv []byte) []common.Uint256 + func (self *CompactMerkleTree) AppendHash(leaf common.Uint256) []common.Uint256 + func (self *CompactMerkleTree) ConsistencyProof(m, n uint32) []common.Uint256 + func (self *CompactMerkleTree) DumpStatus() + func (self *CompactMerkleTree) GetRootWithNewLeaf(newLeaf common.Uint256) common.Uint256 + func (self *CompactMerkleTree) GetRootWithNewLeaves(newLeaf []common.Uint256) common.Uint256 + func (self *CompactMerkleTree) Hashes() []common.Uint256 + func (self *CompactMerkleTree) InclusionProof(m, n uint32) ([]common.Uint256, error) + func (self *CompactMerkleTree) Marshal() ([]byte, error) + func (self *CompactMerkleTree) Root() common.Uint256 + func (self *CompactMerkleTree) TreeSize() uint32 + func (self *CompactMerkleTree) UnMarshal(buf []byte) error + type HashStore interface + Append func(hash []common.Uint256) error + Close func() + Flush func() error + GetHash func(pos uint32) (common.Uint256, error) + func NewFileHashStore(name string, tree_size uint32) (HashStore, error) + func NewMemHashStore() HashStore + type MerkleVerifier struct + func NewMerkleVerifier() *MerkleVerifier + func (self *MerkleVerifier) VerifyConsistency(old_tree_size, new_tree_size uint32, old_root, new_root common.Uint256, ...) error + func (self *MerkleVerifier) VerifyLeafHashInclusion(leaf_hash common.Uint256, leaf_index uint32, proof []common.Uint256, ...) error + func (self *MerkleVerifier) VerifyLeafInclusion(leaf []byte, leaf_index uint32, proof []common.Uint256, ...) error + type TreeHasher struct + func (self TreeHasher) HashFullTree(leaves [][]byte) common.Uint256 + func (self TreeHasher) HashFullTreeWithLeafHash(leaves []common.Uint256) common.Uint256