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

Method Predict

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

Predict returns the hash of the tree that would result from applying the given changes (sorted by key) to the tree, without modifying the tree. It is an error to call Predict if Set has been called without a subsequent call to Snap: in that case, the caller does not know what the current hash is.

(changes []KeyVal)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

TestPredictRandomFunction · 0.65
TestPredictFunction · 0.65

Implementers 2

diskTreempt/disk.go
memTreempt/mem.go

Calls

no outgoing calls

Tested by 2

TestPredictRandomFunction · 0.52
TestPredictFunction · 0.52