MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / GetRoot

Method GetRoot

merkle/merkletrie.go:75–77  ·  view source on GitHub ↗

GetRoot returns the root of merkle tree.

()

Source from the content-addressed store, hash-verified

73
74// GetRoot returns the root of merkle tree.
75func (merkle *Merkle) GetRoot() *hash.Hash {
76 return merkle.tree[len(merkle.tree)-1]
77}
78
79// MergeTwoHash computes the hash of the concatenate of two hash.
80func MergeTwoHash(l *hash.Hash, r *hash.Hash) *hash.Hash {

Callers 6

TestNewMerkleFunction · 0.95
computeMerkleRootMethod · 0.80
setMerkleRootMethod · 0.80
verifyMerkleRootMethod · 0.80
SignMethod · 0.80
VerifyMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestNewMerkleFunction · 0.76