fix(proof-validation): handle optional proof status

Ensure proof status is treated as optional, preventing crashes when status is absent.
- Modify status field to `Option<String>` in `Proof` struct.
- Update validation logic to handle `None` values safely.
- Adjust main logic to check for "permanently_ignored" safely.
This commit is contained in:
Harald Hoyer 2024-11-28 15:48:05 +01:00
parent 5b7f7482e6
commit 4a0a4f6e5e
Signed by: harald
GPG key ID: F519A1143B3FBE32
2 changed files with 8 additions and 4 deletions

View file

@ -155,7 +155,10 @@ async fn verify_batch_proofs(
total_proofs_count += 1;
let tee_type = proof.tee_type.to_uppercase();
if proof.status.eq_ignore_ascii_case("permanently_ignored") {
if proof
.status
.map_or(false, |s| s.eq_ignore_ascii_case("permanently_ignored"))
{
trace!(
batch_no,
tee_type,