Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename EcdsaRecoverEcdsaRecovery #1064

Merged
merged 1 commit into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions crates/engine/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ define_error_codes! {
/// recording was disabled.
LoggingDisabled = 9,
/// ECDSA pubkey recovery failed. Most probably wrong recovery id or signature.
EcdsaRecoverFailed = 11,
EcdsaRecoveryFailed = 11,
}

/// The raw return code returned by the host side.
Expand Down Expand Up @@ -423,7 +423,7 @@ impl Engine {
*output = pub_key.serialize();
Ok(())
}
Err(_) => Err(Error::EcdsaRecoverFailed),
Err(_) => Err(Error::EcdsaRecoveryFailed),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/env/src/engine/experimental_off_chain/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl From<ext::Error> for crate::Error {
ext::Error::CodeNotFound => Self::CodeNotFound,
ext::Error::NotCallable => Self::NotCallable,
ext::Error::LoggingDisabled => Self::LoggingDisabled,
ext::Error::EcdsaRecoverFailed => Self::EcdsaRecoverFailed,
ext::Error::EcdsaRecoveryFailed => Self::EcdsaRecoveryFailed,
}
}
}
Expand Down Expand Up @@ -285,7 +285,7 @@ impl EnvBackend for EnvInstance {
*output = pub_key.serialize();
Ok(())
}
Err(_) => Err(Error::EcdsaRecoverFailed),
Err(_) => Err(Error::EcdsaRecoveryFailed),
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/env/src/engine/off_chain/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl EnvBackend for EnvInstance {
*output = pub_key.serialize();
Ok(())
}
Err(_) => Err(Error::EcdsaRecoverFailed),
Err(_) => Err(Error::EcdsaRecoveryFailed),
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/env/src/engine/on_chain/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ define_error_codes! {
/// recording was disabled.
LoggingDisabled = 9,
/// ECDSA pubkey recovery failed. Most probably wrong recovery id or signature.
EcdsaRecoverFailed = 11,
EcdsaRecoveryFailed = 11,
}

/// Thin-wrapper around a `u32` representing a pointer for Wasm32.
Expand Down
2 changes: 1 addition & 1 deletion crates/env/src/engine/on_chain/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl From<ext::Error> for Error {
ext::Error::CodeNotFound => Self::CodeNotFound,
ext::Error::NotCallable => Self::NotCallable,
ext::Error::LoggingDisabled => Self::LoggingDisabled,
ext::Error::EcdsaRecoverFailed => Self::EcdsaRecoverFailed,
ext::Error::EcdsaRecoveryFailed => Self::EcdsaRecoveryFailed,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/env/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub enum Error {
/// recording was disabled.
LoggingDisabled,
/// ECDSA pubkey recovery failed. Most probably wrong recovery id or signature.
EcdsaRecoverFailed,
EcdsaRecoveryFailed,
}

/// A result of environmental operations.
Expand Down
4 changes: 2 additions & 2 deletions crates/lang/src/env_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ where
/// let failed_result = self.env().ecdsa_recover(&signature, &[0; 32]);
/// assert!(failed_result.is_err());
/// if let Err(e) = failed_result {
/// assert_eq!(e, ink_env::Error::EcdsaRecoverFailed);
/// assert_eq!(e, ink_env::Error::EcdsaRecoveryFailed);
/// }
/// }
/// #
Expand All @@ -836,6 +836,6 @@ where
let mut output = [0; 33];
ink_env::ecdsa_recover(signature, message_hash, &mut output)
.map(|_| output.into())
.map_err(|_| Error::EcdsaRecoverFailed)
.map_err(|_| Error::EcdsaRecoveryFailed)
}
}