Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
gianbelinche committed Nov 21, 2024
1 parent aff7f71 commit effc102
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions core/node/da_clients/src/eigen/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,11 @@ impl RawEigenClient {

match disperser::BlobStatus::try_from(resp.status)? {
disperser::BlobStatus::Processing | disperser::BlobStatus::Dispersing => {
return Err(anyhow::anyhow!("Blob is still processing"))
}
disperser::BlobStatus::Failed => {
return Err(anyhow::anyhow!("Blob dispatch failed"))
Err(anyhow::anyhow!("Blob is still processing"))
}
disperser::BlobStatus::Failed => Err(anyhow::anyhow!("Blob dispatch failed")),
disperser::BlobStatus::InsufficientSignatures => {
return Err(anyhow::anyhow!("Insufficient signatures"))
Err(anyhow::anyhow!("Insufficient signatures"))
}
disperser::BlobStatus::Confirmed => {
if !self.config.wait_for_finalization {
Expand All @@ -295,16 +293,16 @@ impl RawEigenClient {
.ok_or_else(|| anyhow::anyhow!("No blob header in response"))?;
return Ok(blob_info);
}
return Err(anyhow::anyhow!("Blob is still processing"));
Err(anyhow::anyhow!("Blob is still processing"))
}
disperser::BlobStatus::Finalized => {
let blob_info = resp
.info
.ok_or_else(|| anyhow::anyhow!("No blob header in response"))?;
return Ok(blob_info);
Ok(blob_info)
}

_ => return Err(anyhow::anyhow!("Received unknown blob status")),
_ => Err(anyhow::anyhow!("Received unknown blob status")),
}
})
.retry(
Expand All @@ -317,7 +315,7 @@ impl RawEigenClient {
.when(|e| e.to_string().contains("Blob is still processing"))
.await?;

return Ok(blob_info);
Ok(blob_info)
}

#[cfg(test)]
Expand Down
2 changes: 1 addition & 1 deletion core/node/da_clients/src/eigen/verifier.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{collections::HashMap, fs::File, io::BufReader, str::FromStr};
use std::{collections::HashMap, str::FromStr};

use ark_bn254::{Fq, G1Affine};
use ethabi::{encode, Token};
Expand Down

0 comments on commit effc102

Please sign in to comment.