Skip to content

Commit

Permalink
Add check for failed states
Browse files Browse the repository at this point in the history
  • Loading branch information
gianbelinche committed Dec 11, 2024
1 parent d6fde33 commit d237792
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/node/da_clients/src/eigen/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ impl<T: GetBlobData> RawEigenClient<T> {
.into_inner();

match disperser::BlobStatus::try_from(disperse_reply.result)? {
disperser::BlobStatus::Failed => Err(anyhow::anyhow!("Blob dispatch failed")),
disperser::BlobStatus::Failed
| disperser::BlobStatus::InsufficientSignatures
| disperser::BlobStatus::Unknown => Err(anyhow::anyhow!("Blob dispatch failed")),

_ => Ok(hex::encode(disperse_reply.request_id)),
}
Expand Down Expand Up @@ -157,7 +159,9 @@ impl<T: GetBlobData> RawEigenClient<T> {
};

match disperser::BlobStatus::try_from(disperse_reply.result)? {
disperser::BlobStatus::Failed => Err(anyhow::anyhow!("Blob dispatch failed")),
disperser::BlobStatus::Failed
| disperser::BlobStatus::InsufficientSignatures
| disperser::BlobStatus::Unknown => Err(anyhow::anyhow!("Blob dispatch failed")),

_ => Ok(hex::encode(disperse_reply.request_id)),
}
Expand Down

0 comments on commit d237792

Please sign in to comment.