(hash: &Hash, bytes: Vec<u8>)
| 306 | } |
| 307 | |
| 308 | pub fn change_bundle(hash: &Hash, bytes: Vec<u8>) -> pb::ChangeBundle { |
| 309 | pb::ChangeBundle { |
| 310 | hash: Some(hash_proto(hash)), |
| 311 | schema: CHANGE_SCHEMA.to_string(), |
| 312 | payload: bytes, |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | /// A bundle's hash and V3 bytes. An empty schema reads as V3. |
| 317 | pub fn change_from_bundle(bundle: &pb::ChangeBundle) -> Result<(Hash, Vec<u8>), String> { |