Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions crates/common/types/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,13 @@ impl MultiMessageAggregate {
}

/// Errors returned when constructing a [`MultiMessageAggregate`].
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
pub enum MultiMessageAggregateError {
/// Proof bytes exceed `ByteList512KiB`'s cap.
#[error("proof {0} bytes exceeds 512 KiB cap")]
ProofTooLarge(usize),
}

impl core::fmt::Display for MultiMessageAggregateError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
match self {
Self::ProofTooLarge(n) => write!(f, "proof {n} bytes exceeds 512 KiB cap"),
}
}
}

impl std::error::Error for MultiMessageAggregateError {}

// ============================================================================
// Type-1 multi-signature
// ============================================================================
Expand Down
Loading