From cdf107de700388a52a17b2fb852c98420c78278e Mon Sep 17 00:00:00 2001
From: wmjae <wenmujia@gmail.com>
Date: Thu, 9 Jan 2025 19:51:38 +0800
Subject: [PATCH] fix typo (#7096)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Dónal Murray <donalm@seadanda.dev>
---
 .../node/core/approval-voting/src/persisted_entries.rs    | 2 +-
 polkadot/node/core/pvf-checker/src/interest_view.rs       | 2 +-
 polkadot/node/network/approval-distribution/src/tests.rs  | 8 ++++----
 .../src/node/approval/approval-voting.md                  | 2 +-
 polkadot/runtime/rococo/src/xcm_config.rs                 | 2 +-
 substrate/client/allocator/src/freeing_bump.rs            | 2 +-
 substrate/client/api/src/proof_provider.rs                | 2 +-
 substrate/frame/preimage/src/lib.rs                       | 2 +-
 substrate/frame/recovery/README.md                        | 2 +-
 substrate/frame/recovery/src/lib.rs                       | 2 +-
 substrate/frame/support/src/dispatch_context.rs           | 2 +-
 substrate/primitives/api/src/lib.rs                       | 2 +-
 substrate/primitives/runtime/src/traits/mod.rs            | 2 +-
 13 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/polkadot/node/core/approval-voting/src/persisted_entries.rs b/polkadot/node/core/approval-voting/src/persisted_entries.rs
index d891af01c3a..a5d42d9fd6e 100644
--- a/polkadot/node/core/approval-voting/src/persisted_entries.rs
+++ b/polkadot/node/core/approval-voting/src/persisted_entries.rs
@@ -561,7 +561,7 @@ impl BlockEntry {
 		self.distributed_assignments.resize(new_len, false);
 		self.distributed_assignments |= bitfield;
 
-		// If the an operation did not change our current bitfield, we return true.
+		// If an operation did not change our current bitfield, we return true.
 		let distributed = total_one_bits == self.distributed_assignments.count_ones();
 
 		distributed
diff --git a/polkadot/node/core/pvf-checker/src/interest_view.rs b/polkadot/node/core/pvf-checker/src/interest_view.rs
index 05a6f12de5d..617d0e0b5d8 100644
--- a/polkadot/node/core/pvf-checker/src/interest_view.rs
+++ b/polkadot/node/core/pvf-checker/src/interest_view.rs
@@ -58,7 +58,7 @@ impl PvfData {
 		Self { judgement: None, seen_in }
 	}
 
-	/// Mark a the `PvfData` as seen in the provided relay-chain block referenced by `relay_hash`.
+	/// Mark the `PvfData` as seen in the provided relay-chain block referenced by `relay_hash`.
 	pub fn seen_in(&mut self, relay_hash: Hash) {
 		self.seen_in.insert(relay_hash);
 	}
diff --git a/polkadot/node/network/approval-distribution/src/tests.rs b/polkadot/node/network/approval-distribution/src/tests.rs
index 323b2cb08fe..5d79260e3ad 100644
--- a/polkadot/node/network/approval-distribution/src/tests.rs
+++ b/polkadot/node/network/approval-distribution/src/tests.rs
@@ -1255,7 +1255,7 @@ fn import_approval_happy_path_v1_v2_peers() {
 				}
 			);
 
-			// send the an approval from peer_b
+			// send an approval from peer_b
 			let approval = IndirectSignedApprovalVoteV2 {
 				block_hash: hash,
 				candidate_indices: candidate_index.into(),
@@ -1385,7 +1385,7 @@ fn import_approval_happy_path_v2() {
 				}
 			);
 
-			// send the an approval from peer_b
+			// send an approval from peer_b
 			let approval = IndirectSignedApprovalVoteV2 {
 				block_hash: hash,
 				candidate_indices,
@@ -1893,7 +1893,7 @@ fn import_approval_bad() {
 				.unwrap()
 				.unwrap();
 
-			// send the an approval from peer_b, we don't have an assignment yet
+			// send an approval from peer_b, we don't have an assignment yet
 			let approval = IndirectSignedApprovalVoteV2 {
 				block_hash: hash,
 				candidate_indices: candidate_index.into(),
@@ -4172,7 +4172,7 @@ fn import_versioned_approval() {
 				}
 			);
 
-			// send the an approval from peer_a
+			// send an approval from peer_a
 			let approval = IndirectSignedApprovalVote {
 				block_hash: hash,
 				candidate_index,
diff --git a/polkadot/roadmap/implementers-guide/src/node/approval/approval-voting.md b/polkadot/roadmap/implementers-guide/src/node/approval/approval-voting.md
index 40394412d81..7e155cdf7d5 100644
--- a/polkadot/roadmap/implementers-guide/src/node/approval/approval-voting.md
+++ b/polkadot/roadmap/implementers-guide/src/node/approval/approval-voting.md
@@ -406,7 +406,7 @@ Some(core_index), response_sender)`
     * Construct a `IndirectSignedApprovalVote` using the information about the vote.
     * Dispatch `ApprovalDistributionMessage::DistributeApproval`.
   * ELSE
-    * Re-arm the timer with latest tick we have the send a the vote.
+    * Re-arm the timer with latest tick we have then send the vote.
 
 ### Determining Approval of Candidate
 
diff --git a/polkadot/runtime/rococo/src/xcm_config.rs b/polkadot/runtime/rococo/src/xcm_config.rs
index 82a3136cc0d..bb77ec0000e 100644
--- a/polkadot/runtime/rococo/src/xcm_config.rs
+++ b/polkadot/runtime/rococo/src/xcm_config.rs
@@ -84,7 +84,7 @@ pub type LocalAssetTransactor = FungibleAdapter<
 	LocalCheckAccount,
 >;
 
-/// The means that we convert an the XCM message origin location into a local dispatch origin.
+/// The means that we convert the XCM message origin location into a local dispatch origin.
 type LocalOriginConverter = (
 	// A `Signed` origin of the sovereign account that the original location controls.
 	SovereignSignedViaLocation<LocationConverter, RuntimeOrigin>,
diff --git a/substrate/client/allocator/src/freeing_bump.rs b/substrate/client/allocator/src/freeing_bump.rs
index 144c0764540..405916adc3c 100644
--- a/substrate/client/allocator/src/freeing_bump.rs
+++ b/substrate/client/allocator/src/freeing_bump.rs
@@ -182,7 +182,7 @@ const NIL_MARKER: u32 = u32::MAX;
 enum Link {
 	/// Nil, denotes that there is no next element.
 	Nil,
-	/// Link to the next element represented as a pointer to the a header.
+	/// Link to the next element represented as a pointer to the header.
 	Ptr(u32),
 }
 
diff --git a/substrate/client/api/src/proof_provider.rs b/substrate/client/api/src/proof_provider.rs
index 7f60f856ae8..9043d348272 100644
--- a/substrate/client/api/src/proof_provider.rs
+++ b/substrate/client/api/src/proof_provider.rs
@@ -82,7 +82,7 @@ pub trait ProofProvider<Block: BlockT> {
 	) -> sp_blockchain::Result<Vec<(KeyValueStorageLevel, bool)>>;
 
 	/// Verify read storage proof for a set of keys.
-	/// Returns collected key-value pairs and a the nested state
+	/// Returns collected key-value pairs and the nested state
 	/// depth of current iteration or 0 if completed.
 	fn verify_range_proof(
 		&self,
diff --git a/substrate/frame/preimage/src/lib.rs b/substrate/frame/preimage/src/lib.rs
index 658e7fec534..849ffddf4fb 100644
--- a/substrate/frame/preimage/src/lib.rs
+++ b/substrate/frame/preimage/src/lib.rs
@@ -236,7 +236,7 @@ pub mod pallet {
 			Self::do_unrequest_preimage(&hash)
 		}
 
-		/// Ensure that the a bulk of pre-images is upgraded.
+		/// Ensure that the bulk of pre-images is upgraded.
 		///
 		/// The caller pays no fee if at least 90% of pre-images were successfully updated.
 		#[pallet::call_index(4)]
diff --git a/substrate/frame/recovery/README.md b/substrate/frame/recovery/README.md
index fdaef5784fd..39f69140704 100644
--- a/substrate/frame/recovery/README.md
+++ b/substrate/frame/recovery/README.md
@@ -62,7 +62,7 @@ The intended life cycle of a successful recovery takes the following steps:
 
 ### Malicious Recovery Attempts
 
-Initializing a the recovery process for a recoverable account is open and
+Initializing the recovery process for a recoverable account is open and
 permissionless. However, the recovery deposit is an economic deterrent that
 should disincentivize would-be attackers from trying to maliciously recover
 accounts.
diff --git a/substrate/frame/recovery/src/lib.rs b/substrate/frame/recovery/src/lib.rs
index 5a97b03cd23..42fb641983f 100644
--- a/substrate/frame/recovery/src/lib.rs
+++ b/substrate/frame/recovery/src/lib.rs
@@ -75,7 +75,7 @@
 //!
 //! ### Malicious Recovery Attempts
 //!
-//! Initializing a the recovery process for a recoverable account is open and
+//! Initializing the recovery process for a recoverable account is open and
 //! permissionless. However, the recovery deposit is an economic deterrent that
 //! should disincentivize would-be attackers from trying to maliciously recover
 //! accounts.
diff --git a/substrate/frame/support/src/dispatch_context.rs b/substrate/frame/support/src/dispatch_context.rs
index b34c6bdada3..42776e71cb8 100644
--- a/substrate/frame/support/src/dispatch_context.rs
+++ b/substrate/frame/support/src/dispatch_context.rs
@@ -140,7 +140,7 @@ impl<T> Value<'_, T> {
 
 /// Runs the given `callback` in the dispatch context and gives access to some user defined value.
 ///
-/// Passes the a mutable reference of [`Value`] to the callback. The value will be of type `T` and
+/// Passes a mutable reference of [`Value`] to the callback. The value will be of type `T` and
 /// is identified using the [`TypeId`] of `T`. This means that `T` should be some unique type to
 /// make the value unique. If no value is set yet [`Value::get()`] and [`Value::get_mut()`] will
 /// return `None`. It is totally valid to have some `T` that is shared between different callers to
diff --git a/substrate/primitives/api/src/lib.rs b/substrate/primitives/api/src/lib.rs
index b412d4b52fe..8909d2b2e48 100644
--- a/substrate/primitives/api/src/lib.rs
+++ b/substrate/primitives/api/src/lib.rs
@@ -666,7 +666,7 @@ pub struct CallApiAtParams<'a, Block: BlockT> {
 	pub extensions: &'a RefCell<Extensions>,
 }
 
-/// Something that can call into the an api at a given block.
+/// Something that can call into an api at a given block.
 #[cfg(feature = "std")]
 pub trait CallApiAt<Block: BlockT> {
 	/// The state backend that is used to store the block states.
diff --git a/substrate/primitives/runtime/src/traits/mod.rs b/substrate/primitives/runtime/src/traits/mod.rs
index 5b6cacc7e00..8f5b484e4e3 100644
--- a/substrate/primitives/runtime/src/traits/mod.rs
+++ b/substrate/primitives/runtime/src/traits/mod.rs
@@ -1963,7 +1963,7 @@ pub trait AccountIdConversion<AccountId>: Sized {
 		Self::try_from_sub_account::<()>(a).map(|x| x.0)
 	}
 
-	/// Convert this value amalgamated with the a secondary "sub" value into an account ID,
+	/// Convert this value amalgamated with a secondary "sub" value into an account ID,
 	/// truncating any unused bytes. This is infallible.
 	///
 	/// NOTE: The account IDs from this and from `into_account` are *not* guaranteed to be distinct
-- 
GitLab