Fold a change sequence into its merkle state. This mirrors `put_change`: `state_n = state_{n-1}.next(hash_n)`, seeded at [`Merkle::ZERO`].
(changes: &[Hash])
| 106 | /// This mirrors `put_change`: `state_n = state_{n-1}.next(hash_n)`, |
| 107 | /// seeded at [`Merkle::ZERO`]. |
| 108 | pub fn fold(changes: &[Hash]) -> Merkle { |
| 109 | changes |
| 110 | .iter() |
| 111 | .fold(Merkle::ZERO, |state, hash| state.next(hash)) |
| 112 | } |
| 113 | |
| 114 | /// Build a manifest from parts, computing the state from the log. |
| 115 | pub fn new( |
no test coverage detected