rust-ceramic
rust-ceramic copied to clipboard
chore: Deserialize CAR into Event before extracting EventID
There should be no functional changes here, just code refactoring.
This PR splits the event_id_from_car
function into two phases: first parse the CAR data into an Event struct, solely based on the data in the car without any reliance on the blockstore. Then, given the Event struct and access to the blockstore, get the EventID. This is setting the groundwork to be able to add the code that re-serializes the Event struct back into a CAR file to compare the bytes and ensure that no extra fields are present.