MCPcopy Create free account
hub / github.com/rsc/tmp / TreeHash

Function TreeHash

mpt/tree.go:228–234  ·  view source on GitHub ↗

TreeHash computes the snapshot hash of a tree consisting of the sequence of key-value items. The sequence must be sorted by increasing key value (such as by [Key.Compare] or [KeyVal.Compare]), and a key cannot appear multiple times in the list. TreeHash panics if the sequence is not sorted or a key

(seq iter.Seq[KeyVal])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

TestAllTreesFunction · 0.85
TestPredictFunction · 0.85

Calls 4

reduceFunction · 0.85
prefixFunction · 0.85
hashLeafFunction · 0.85
hashStackFunction · 0.85

Tested by 2

TestAllTreesFunction · 0.68
TestPredictFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…