Skip to content

Commit 0497f9f

Browse files
committed
Remove VerificationError::MessageTooLong too
1 parent 566ab76 commit 0497f9f

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/std/src/errors/verification_error.rs

-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ pub enum VerificationError {
1212
BatchErr,
1313
#[error("Generic error")]
1414
GenericErr,
15-
#[error("Message is longer than supported")]
16-
MessageTooLong,
1715
#[error("Invalid hash format")]
1816
InvalidHashFormat,
1917
#[error("Invalid signature format")]
@@ -45,7 +43,6 @@ impl PartialEq<VerificationError> for VerificationError {
4543
match self {
4644
VerificationError::BatchErr => matches!(rhs, VerificationError::BatchErr),
4745
VerificationError::GenericErr => matches!(rhs, VerificationError::GenericErr),
48-
VerificationError::MessageTooLong => matches!(rhs, VerificationError::MessageTooLong),
4946
VerificationError::InvalidHashFormat => {
5047
matches!(rhs, VerificationError::InvalidHashFormat)
5148
}

packages/std/src/imports.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl Api for ExternalApi {
279279
match result {
280280
0 => Ok(true),
281281
1 => Ok(false),
282-
2 => Err(VerificationError::MessageTooLong),
282+
2 => panic!("MessageTooLong must not happen. This is a bug in the VM."),
283283
3 => panic!("InvalidHashFormat must not happen. This is a bug in the VM."),
284284
4 => Err(VerificationError::InvalidSignatureFormat),
285285
5 => Err(VerificationError::InvalidPubkeyFormat),
@@ -311,7 +311,7 @@ impl Api for ExternalApi {
311311
match result {
312312
0 => Ok(true),
313313
1 => Ok(false),
314-
2 => Err(VerificationError::MessageTooLong),
314+
2 => panic!("MessageTooLong must not happen. This is a bug in the VM."),
315315
3 => panic!("InvalidHashFormat must not happen. This is a bug in the VM."),
316316
4 => Err(VerificationError::InvalidSignatureFormat),
317317
5 => Err(VerificationError::InvalidPubkeyFormat),

0 commit comments

Comments
 (0)