(rows: &[Vec<u8>])
| 950 | } |
| 951 | |
| 952 | fn canonical_root_bytes(rows: &[Vec<u8>]) -> Vec<u8> { |
| 953 | let mut bytes = b"atomic.verified-candidates-v1\0".to_vec(); |
| 954 | bytes.extend_from_slice(&(rows.len() as u64).to_le_bytes()); |
| 955 | for row in rows { |
| 956 | bytes.extend_from_slice(&(row.len() as u64).to_le_bytes()); |
| 957 | bytes.extend_from_slice(row); |
| 958 | } |
| 959 | bytes |
| 960 | } |
| 961 | |
| 962 | #[cfg(all(test, unix))] |
| 963 | mod tests { |
no test coverage detected