Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Checksum ¶
Checksum returns the checksum for a given piece of data using sha256 twice as the hash algorithm.
func DoubleSha256 ¶
DoubleSha256 performs sha256 twice on the given data.
Types ¶
type MerkleTree ¶
type MerkleTree struct {
// contains filtered or unexported fields
}
MerkleTree implementation.
func NewMerkleTree ¶
func NewMerkleTree(hashes []util.Uint256) (*MerkleTree, error)
NewMerkleTree returns new MerkleTree object.
func (*MerkleTree) Root ¶
func (t *MerkleTree) Root() util.Uint256
Root returns the computed root hash of the MerkleTree.
type MerkleTreeNode ¶
type MerkleTreeNode struct {
// contains filtered or unexported fields
}
MerkleTreeNode represents a node in the MerkleTree.
func (*MerkleTreeNode) IsLeaf ¶
func (n *MerkleTreeNode) IsLeaf() bool
IsLeaf returns whether this node is a leaf node or not.
func (*MerkleTreeNode) IsRoot ¶
func (n *MerkleTreeNode) IsRoot() bool
IsRoot returns whether this node is a root node or not.
Click to show internal directories.
Click to hide internal directories.