chore(rust): proofreading (#3152)

Came across few typos while browsing ./rust.
One of them is an error message displayed to the user, rest are
comments.
Hope I could be of any help.
Have a nice week-end

Co-authored-by: Daniel Savu <23065004+daniel-savu@users.noreply.github.com>
pull/3208/head
Huulu 9 months ago committed by GitHub
parent 1adce84e33
commit 3ea5dd7b66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      rust/agents/relayer/src/msg/processor.rs
  2. 4
      rust/chains/hyperlane-cosmos/src/libs/address.rs
  3. 2
      rust/chains/hyperlane-sealevel/src/mailbox.rs
  4. 4
      rust/sealevel/client/src/warp_route.rs
  5. 2
      rust/sealevel/libraries/test-utils/src/lib.rs

@ -421,7 +421,7 @@ mod test {
.iter()
.zip(msg_retries_to_set.iter())
.for_each(|(pm, expected_retries)| {
// Round up the actuall backoff because it was calculated with an `Instant::now()` that was a fraction of a second ago
// Round up the actual backoff because it was calculated with an `Instant::now()` that was a fraction of a second ago
let expected_backoff = PendingMessage::calculate_msg_backoff(*expected_retries)
.map(|b| b.as_secs_f32().round());
let actual_backoff = pm._next_attempt_after().map(|instant| {

@ -36,7 +36,7 @@ impl CosmosAddress {
Ok(CosmosAddress::new(account_id, digest))
}
/// Creates a wrapper arround a cosmrs AccountId from a private key byte array
/// Creates a wrapper around a cosmrs AccountId from a private key byte array
pub fn from_privkey(priv_key: &[u8], prefix: &str) -> ChainResult<Self> {
let pubkey = SigningKey::from_slice(priv_key)
.map_err(Into::<HyperlaneCosmosError>::into)?
@ -44,7 +44,7 @@ impl CosmosAddress {
Self::from_pubkey(pubkey, prefix)
}
/// Creates a wrapper arround a cosmrs AccountId from a H256 digest
/// Creates a wrapper around a cosmrs AccountId from a H256 digest
///
/// - digest: H256 digest (hex representation of address)
/// - prefix: Bech32 prefix

@ -113,7 +113,7 @@ impl SealevelMailbox {
/// Simulates an instruction, and attempts to deserialize it into a T.
/// If no return data at all was returned, returns Ok(None).
/// If some return data was returned but deserialization was unsuccesful,
/// If some return data was returned but deserialization was unsuccessful,
/// an Err is returned.
pub async fn simulate_instruction<T: BorshDeserialize + BorshSerialize>(
&self,

@ -206,7 +206,7 @@ impl RouterDeployer<TokenConfig> for WarpRouteDeployer {
let domain_id = chain_config.domain_id();
// TODO: consider pulling the setting of defaults into router.rs,
// and possibly have a more distinct connection client abstration.
// and possibly have a more distinct connection client abstraction.
let mailbox = app_config
.router_config()
@ -286,7 +286,7 @@ impl RouterDeployer<TokenConfig> for WarpRouteDeployer {
collateral_info
.spl_token_program
.as_ref()
.expect("Cannot initalize collateral warp route without SPL token program")
.expect("Cannot initialize collateral warp route without SPL token program")
.program_id(),
collateral_info.mint.parse().expect("Invalid mint address"),
)

@ -105,7 +105,7 @@ async fn initialize_test_ism(
/// Simulates an instruction, and attempts to deserialize it into a T.
/// If no return data at all was returned, returns Ok(None).
/// If some return data was returned but deserialization was unsuccesful,
/// If some return data was returned but deserialization was unsuccessful,
/// an Err is returned.
pub async fn simulate_instruction<T: BorshDeserialize + BorshSerialize>(
banks_client: &mut BanksClient,

Loading…
Cancel
Save