MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / compute_rev

Function compute_rev

document/graph-storage/src/ids.rs:115–133  ·  view source on GitHub ↗

Hash the identity-bearing fields of a `Delta` with blake3 and truncate to 128 bits. A [`RegistryDelta::Merge`] is addressed by its sorted parent set alone (author and timestamp excluded), so two peers merging the same tips mint the identical `Rev` and dedup. Every other delta hashes `(parent, author, timestamp, kind)`.

(parent: Option<Rev>, author: PeerId, timestamp: TimeStamp, delta_type: &RegistryDelta)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

newMethod · 0.85
mergeMethod · 0.85
recomputed_idMethod · 0.85

Calls 5

RevClass · 0.85
finalizeMethod · 0.80
into_iterMethod · 0.45
iterMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected