Recompute `closure_root` over the ordered change hashes.
(&self)
| 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, |