MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / compute_closure_root

Method compute_closure_root

atomic-repository/src/git_binding/codec.rs:301–308  ·  view source on GitHub ↗

Recompute `closure_root` over the ordered change hashes.

(&self)

Source from the content-addressed store, hash-verified

299
300 /// Recompute `closure_root` over the ordered change hashes.
301 pub fn compute_closure_root(&self) -> Hash {
302 let mut hasher = blake3::Hasher::new();
303 hasher.update(CLOSURE_ROOT_DOMAIN);
304 for change in &self.ordered_changes {
305 hasher.update(change.as_bytes());
306 }
307 Hash::from_bytes(*hasher.finalize().as_bytes())
308 }
309
310 /// Reject structurally impossible payloads before they can be signed or
311 /// trusted: version, zero operation, ordering, raw-object consistency,

Calls 3

updateMethod · 0.45
as_bytesMethod · 0.45
finalizeMethod · 0.45