diff --git a/bin/verify-era-proof-attestation/src/proof.rs b/bin/verify-era-proof-attestation/src/proof.rs index 3cd0ec1f..5b96dd3b 100644 --- a/bin/verify-era-proof-attestation/src/proof.rs +++ b/bin/verify-era-proof-attestation/src/proof.rs @@ -37,7 +37,12 @@ pub async fn get_proofs( .send(stop_receiver, http_client, rpc_url) .await?; - if !proofs.is_empty() { + if !proofs.is_empty() + && proofs.iter().all(|proof| { + !proof.status.eq_ignore_ascii_case("failed") + && !proof.status.eq_ignore_ascii_case("picked_by_prover") + }) + { return Ok(proofs); } @@ -160,6 +165,7 @@ pub struct Proof { #[serde_as(as = "Hex")] pub proof: Vec, pub proved_at: String, + pub status: String, #[serde_as(as = "Hex")] pub attestation: Vec, }