Skip to content

Commit

Permalink
chore: use core::error for blob validation error (#1887)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jan 4, 2025
1 parent 40e3378 commit 93972c7
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions crates/eips/src/eip4844/sidecar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,18 +455,8 @@ pub enum BlobTransactionValidationError {
},
}

#[cfg(all(feature = "kzg", feature = "std"))]
impl std::error::Error for BlobTransactionValidationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match self {
Self::KZGError(source) => Some(source),
Self::InvalidProof { .. }
| Self::NotBlobTransaction { .. }
| Self::MissingSidecar { .. }
| Self::WrongVersionedHash { .. } => None,
}
}
}
#[cfg(feature = "kzg")]
impl core::error::Error for BlobTransactionValidationError {}

#[cfg(feature = "kzg")]
impl core::fmt::Display for BlobTransactionValidationError {
Expand Down

0 comments on commit 93972c7

Please sign in to comment.