package
module
Version:
v0.0.0-...-bfc91e7
Opens a new window with list of versions in this module.
Published: May 30, 2017
License: MPL-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
merkle
A Golang implementation of a Merkle tree.
Run tests:
go test ./...
Documentation
¶
type Node struct {
Parent, Left, Right *Node
}
Node is a basic unit of a tree
BuildTree builds a tree from leaf nodes and returns a root node
NewLeafNode returns a new node from a data block using the provided
crypto.Hash, and calculates the block's checksum
Checksum returns the checksum of a data block if it is a leaf node,
or the concatenated checksum of this node's children
IsLeaf returns true if this is a leaf node (has no children)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.