(hashes: &[Hash])
| 176 | Hash::of(&n.to_le_bytes()) |
| 177 | } |
| 178 | fn legacy(hashes: &[Hash]) -> Vec<u8> { |
| 179 | let mut bytes = (hashes.len() as u32).to_le_bytes().to_vec(); |
| 180 | for hash in hashes { |
| 181 | bytes.extend_from_slice(hash.as_bytes()); |
| 182 | } |
| 183 | bytes |
| 184 | } |
| 185 | |
| 186 | #[test] |
| 187 | fn exact_order_duplicates_empty_and_divergent_sets_roundtrip() { |