Skip to content

Commit

Permalink
Merge pull request #385 from helium/bbalser/change-entropy-id
Browse files Browse the repository at this point in the history
Change entropy id to hash of entire report
  • Loading branch information
madninja authored Feb 25, 2023
2 parents a31f597 + 78c65d4 commit 91462f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iot_verifier/src/entropy_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ impl EntropyLoader {
async fn handle_report(&self, file_type: FileType, buf: &[u8]) -> anyhow::Result<()> {
match file_type {
FileType::EntropyReport => {
let id = hash(buf).as_bytes().to_vec();
let event = EntropyReportV1::decode(buf)?;
tracing::debug!("entropy report: {:?}", event);
let id = hash(&event.data).as_bytes().to_vec();
Entropy::insert_into(
&self.pool,
&id,
Expand Down

0 comments on commit 91462f0

Please sign in to comment.