Skip to content

Commit

Permalink
Check for null certificate before unwrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
moshababo committed Aug 5, 2024
1 parent 2824931 commit 65d3fa3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/lib/dal/src/consensus_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,10 @@ impl ConsensusDal<'_, '_> {
else {
return Ok(None);
};
Ok(Some(zksync_protobuf::serde::deserialize(
row.certificate.unwrap(),
)?))
let Some(certificate) = row.certificate else {
return Ok(None);
};
Ok(Some(zksync_protobuf::serde::deserialize(certificate)?))
}

pub async fn batch_committee(
Expand Down

0 comments on commit 65d3fa3

Please sign in to comment.