Skip to content

Commit

Permalink
Fix typos (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 authored Feb 27, 2023
1 parent c4cb0d4 commit 088861b
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 23 deletions.
1 change: 1 addition & 0 deletions .changelog/unreleased/bug/472-fix-typos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix typos ([\#472](https://github.com/cosmos/ibc-rs/issues/472))
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,6 @@ Our release process is as follows:
GitHub: `git tag -s -a vX.Y.Z`. In the tag message, write the version and the link
to the corresponding section of the changelog.
10. Once the tag is pushed, create a GitHub release and append
`[📖CHANGELOG](https://github.com/cosmos/ibc-rs/blob/main/CHANGELOG.md#vXYZ)`
`[📖CHANGELOG](https://github.com/cosmos/ibc-rs/blob/main/CHANGELOG.md#vXYZ)`
to the release description.
11. All done! 🎉
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
![Rust Stable][rustc-image]
![Rust 1.60+][rustc-version]

Rust implementation of the Inter-Blockchain Communication (IBC) protocol. This project hosts
Rust implementation of the Inter-Blockchain Communication (IBC) protocol. This project hosts
the `ibc` rust crate which defines the main data structures and on-chain logic for the IBC protocol.

See the [ibc](crates/ibc) crate's README.md for more detailed information on the `ibc` crate.
Expand Down
4 changes: 2 additions & 2 deletions ci/no-std-check/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Now we have to modify [lib.rs](./src/lib.rs) again and only import the crate if
use my_package;
```

Retore the original `use-unsupported` list, and add `my-package` to the end of the list:
Restore the original `use-unsupported` list, and add `my-package` to the end of the list:

```toml
use-unsupported = [
Expand Down Expand Up @@ -130,7 +130,7 @@ error: could not compile `no-std-check`
- Crates must be listed on both `Cargo.toml` and `lib.rs`.
- Crates that are listed in `Cargo.toml` but not imported inside `lib.rs` are not checked.

### Overrride std crates using Cargo Nightly
### Override std crates using Cargo Nightly

This uses the unstable `build-std` feature provided by
[Cargo Nightly](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-std).
Expand Down
2 changes: 1 addition & 1 deletion crates/ibc/src/applications/transfer/denom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ pub fn is_receiver_chain_source(
// A: sender chain in this transfer, port "transfer" and channel "c2b" (to B)
// B: receiver chain in this transfer, port "transfer" and channel "c2a" (to A)
//
// If B had originally sent the token in a previous tranfer, then A would have stored the token as
// If B had originally sent the token in a previous transfer, then A would have stored the token as
// "transfer/c2b/{token_denom}". Now, A is sending to B, so to check if B is the source of the token,
// we need to check if the token starts with "transfer/c2b".
let prefix = TracePrefix::new(source_port, source_channel);
Expand Down
2 changes: 1 addition & 1 deletion crates/ibc/src/applications/transfer/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub enum TokenTransferError {
InvalidPacketTimeoutTimestamp { timestamp: u64 },
/// base denomination is empty
EmptyBaseDenom,
/// invalid prot id n trace at postion: `{pos}`, validation error: `{validation_error}`
/// invalid prot id n trace at position: `{pos}`, validation error: `{validation_error}`
InvalidTracePortId {
pos: usize,
validation_error: ValidationError,
Expand Down
4 changes: 2 additions & 2 deletions crates/ibc/src/core/context/timeout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ mod tests {

assert!(res.is_ok());

// Unordered channnels only emit one event
// Unordered channels only emit one event
assert_eq!(ctx.events.len(), 1);
assert!(matches!(
ctx.events.first().unwrap(),
Expand Down Expand Up @@ -311,7 +311,7 @@ mod tests {

assert!(res.is_ok());

// Ordered channnels emit 2 events
// Ordered channels emit 2 events
assert_eq!(ctx.events.len(), 2);
assert!(matches!(ctx.events[0], IbcEvent::TimeoutPacket(_)));
assert!(matches!(ctx.events[1], IbcEvent::ChannelClosed(_)));
Expand Down
2 changes: 1 addition & 1 deletion crates/ibc/src/core/ics02_client/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub enum ClientError {
},
/// timestamp is invalid or missing, timestamp=`{time1}`, now=`{time2}`
InvalidConsensusStateTimestamp { time1: Timestamp, time2: Timestamp },
/// header not withing trusting period: expires_at=`{latest_time}` now=`{update_time}`
/// header not within trusting period: expires_at=`{latest_time}` now=`{update_time}`
HeaderNotWithinTrustPeriod {
latest_time: Timestamp,
update_time: Timestamp,
Expand Down
2 changes: 1 addition & 1 deletion crates/ibc/src/core/ics03_connection/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub enum ConnectionError {
MissingConsensusHeight,
/// invalid connection proof error
InvalidProof,
/// verifying connnection state error: `{0}`
/// verifying connection state error: `{0}`
VerifyConnectionState(client_error::ClientError),
/// invalid signer error: `{0}`
Signer(SignerError),
Expand Down
2 changes: 1 addition & 1 deletion crates/ibc/src/core/ics03_connection/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct Version {
}

impl Version {
/// Checks whether or not the given feature is supported in this versin
/// Checks whether or not the given feature is supported in this version
pub fn is_supported_feature(&self, feature: String) -> bool {
self.features.contains(&feature)
}
Expand Down
6 changes: 3 additions & 3 deletions crates/ibc/src/core/ics04_channel/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ pub enum ChannelError {
NonUtf8PacketData,
/// missing counterparty
MissingCounterparty,
/// no commong version
/// no common version
NoCommonVersion,
/// missing channel end
MissingChannel,
/// single version must be negociated on connection before opening channel
/// single version must be negotiated on connection before opening channel
InvalidVersionLengthConnection,
/// the channel ordering is not supported by connection
ChannelFeatureNotSuportedByConnection,
ChannelFeatureNotSupportedByConnection,
/// the channel end (`{port_id}`, `{channel_id}`) does not exist
ChannelNotFound {
port_id: PortId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ where

let channel_feature = msg.ordering.to_string();
if !conn_version.is_supported_feature(channel_feature) {
return Err(ChannelError::ChannelFeatureNotSuportedByConnection.into());
return Err(ChannelError::ChannelFeatureNotSupportedByConnection.into());
}

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion crates/ibc/src/core/ics04_channel/handler/chan_open_try.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ where

let channel_feature = msg.ordering.to_string();
if !conn_version.is_supported_feature(channel_feature) {
return Err(ChannelError::ChannelFeatureNotSuportedByConnection)
return Err(ChannelError::ChannelFeatureNotSupportedByConnection)
.map_err(ContextError::ChannelError);
}

Expand Down
2 changes: 1 addition & 1 deletion crates/ibc/src/core/ics04_channel/timeout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl TimeoutHeight {
}
}

/// Check if a height is *stricly past* the timeout height, and thus is
/// Check if a height is *strictly past* the timeout height, and thus is
/// deemed expired.
pub fn has_expired(&self, height: Height) -> bool {
match self {
Expand Down
2 changes: 1 addition & 1 deletion crates/ibc/src/core/ics23_commitment/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fn calculate_non_existence_root(proof: &NonExistenceProof) -> Result<Vec<u8>, Co
// Merkle Proof serialization notes:
// "Proof" id currently defined in a number of forms and included in a number of places
// - TmProof: in tendermint-rs/src/merkle/proof.rs:Proof
// - RawProofOps: in tendermint-proto/tendermint.cyrpto.rs:ProofOps
// - RawProofOps: in tendermint-proto/tendermint.crypto.rs:ProofOps
// - RawMerkleProof: in ibc-proto/ibc.core.commitment.v1.rs:MerkleProof
// - structure that includes a RawProofOps in its only `proof` field.
// #[derive(Clone, PartialEq, ::prost::Message)]
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/adr-001-handler-implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ pub fn keep(
> the actual requirements.
Each submodule is responsible for dispatching the messages it is given to the appropriate
message processing function and, if successful, pass the resulting data to the persistance
message processing function and, if successful, pass the resulting data to the persistence
function defined in the previous section.

To this end, the submodule should define an enumeration of all messages, in order
Expand Down Expand Up @@ -554,7 +554,7 @@ pub trait ClientKeeper {

This way, only one implementation of the `ClientReader` and `ClientKeeper` trait is required,
as it can delegate eg. the serialization of the underlying datatypes to the `Serialize` bound
of the `Any...` wrappper.
of the `Any...` wrapper.

Both the `process` and `keep` function are defined to take a message generic over
the actual client type:
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adr-003-ics20-implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub fn on_acknowledgement_packet<Ctx>(ctx: &Ctx, ack: ICS20Acknowledgement, data
where Ctx: ICS20Context
{
match ack {
ICS20Acknowledgement::Sucess => Ok(()),
ICS20Acknowledgement::Success => Ok(()),
_ => refund_packet_token(ctx, data)
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/adr-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## Context

> This section contains all the context one needs to understand the current state, and why there is a problem. It should be as succinct as possible and introduce the high level idea behind the solution.
> This section contains all the context one needs to understand the current state, and why there is a problem. It should be as succinct as possible and introduce the high level idea behind the solution.
## Decision

> This section explains all of the details of the proposed solution, including implementation details.
Expand All @@ -31,6 +31,6 @@ If the proposed change will be large, please also indicate a way to do the chang

## References

> Are there any relevant PR comments, issues that led up to this, or articles referrenced for why we made the given design choice? If so link them here!
> Are there any relevant PR comments, issues that led up to this, or articles referenced for why we made the given design choice? If so link them here!
* {reference link}

0 comments on commit 088861b

Please sign in to comment.