Documentation ¶
Overview ¶
Package testonly contains code and data for testing Merkle trees.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompactTrees ¶
func CompactTrees() [][][]byte
CompactTrees returns a slice of compact.Tree internal hashes for all subsequent trees built from LeafInputs() using the RFC 6962 hashing strategy.
func EmptyRootHash ¶
func EmptyRootHash() []byte
EmptyRootHash returns the root hash for an empty Merkle tree that uses SHA256-based strategy from RFC 6962.
func LeafInputs ¶
func LeafInputs() [][]byte
LeafInputs returns a slice of leaf inputs for testing Merkle trees.
func NodeHashes ¶
func NodeHashes() [][][]byte
NodeHashes returns a structured slice of node hashes for all complete subtrees of a Merkle tree built from LeafInputs() using the RFC 6962 hashing strategy. The first index in the slice is the tree level (zero being the leaves level), the second is the horizontal index within a level.
func RootHashes ¶
func RootHashes() [][]byte
RootHashes returns a slice of Merkle tree root hashes for all subsequent trees built from LeafInputs() using the RFC 6962 hashing strategy. Hashes are indexed by tree size starting from an empty tree.
Types ¶
This section is empty.