Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fix some typos (#12584)
Browse files Browse the repository at this point in the history
  • Loading branch information
joepetrowski committed Oct 31, 2022
1 parent 5ae005c commit 7035139
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
12 changes: 6 additions & 6 deletions frame/conviction-voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ pub mod pallet {

/// The maximum number of concurrent votes an account may have.
///
/// Also used to compute weight, an overly large value can
/// lead to extrinsic with large weight estimation: see `delegate` for instance.
/// Also used to compute weight, an overly large value can lead to extrinsics with large
/// weight estimation: see `delegate` for instance.
#[pallet::constant]
type MaxVotes: Get<u32>;

Expand Down Expand Up @@ -261,7 +261,7 @@ pub mod pallet {
/// Undelegate the voting power of the sending account for a particular class of polls.
///
/// Tokens may be unlocked following once an amount of time consistent with the lock period
/// of the conviction with which the delegation was issued.
/// of the conviction with which the delegation was issued has passed.
///
/// The dispatch origin of this call must be _Signed_ and the signing account must be
/// currently delegating.
Expand All @@ -284,7 +284,7 @@ pub mod pallet {
Ok(Some(T::WeightInfo::undelegate(votes)).into())
}

/// Remove the lock caused prior voting/delegating which has expired within a particluar
/// Remove the lock caused by prior voting/delegating which has expired within a particular
/// class.
///
/// The dispatch origin of this call must be _Signed_.
Expand Down Expand Up @@ -475,7 +475,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
})
}

/// Return the number of votes for `who`
/// Return the number of votes for `who`.
fn increase_upstream_delegation(
who: &T::AccountId,
class: &ClassOf<T, I>,
Expand Down Expand Up @@ -503,7 +503,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
})
}

/// Return the number of votes for `who`
/// Return the number of votes for `who`.
fn reduce_upstream_delegation(
who: &T::AccountId,
class: &ClassOf<T, I>,
Expand Down
2 changes: 1 addition & 1 deletion frame/conviction-voting/src/vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ where
AsMut::<PriorLock<BlockNumber, Balance>>::as_mut(self).rejig(now);
}

/// The amount of this account's balance that much currently be locked due to voting.
/// The amount of this account's balance that must currently be locked due to voting.
pub fn locked_balance(&self) -> Balance {
match self {
Voting::Casting(Casting { votes, prior, .. }) =>
Expand Down
10 changes: 5 additions & 5 deletions frame/ranked-collective/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//! systems such as the Referenda pallet. Members each have a rank, with zero being the lowest.
//! There is no complexity limitation on either the number of members at a rank or the number of
//! ranks in the system thus allowing potentially public membership. A member of at least a given
//! rank can be selected at random in O(1) time, allowing for various games to constructed using
//! rank can be selected at random in O(1) time, allowing for various games to be constructed using
//! this as a primitive. Members may only be promoted and demoted by one rank at a time, however
//! all operations (save one) are O(1) in complexity. The only operation which is not O(1) is the
//! `remove_member` since they must be removed from all ranks from the present down to zero.
Expand All @@ -33,7 +33,7 @@
//!
//! Two `Config` trait items control these "rank privileges": `MinRankOfClass` and `VoteWeight`.
//! The first controls which ranks are allowed to vote on a particular class of poll. The second
//! controls the weight of a vote given the voters rank compared to the minimum rank of the poll.
//! controls the weight of a vote given the voter's rank compared to the minimum rank of the poll.
//!
//! An origin control, `EnsureRank`, ensures that the origin is a member of the collective of at
//! least a particular rank.
Expand Down Expand Up @@ -310,8 +310,8 @@ impl<T: Config<I>, I: 'static, const MIN_RANK: u16> EnsureOrigin<T::RuntimeOrigi
}
}

/// Guard to ensure that the given origin is a member of the collective. The pair of including both
/// the account ID and the rank of the member is the `Success` value.
/// Guard to ensure that the given origin is a member of the collective. The pair of both the
/// account ID and the rank of the member is the `Success` value.
pub struct EnsureRankedMember<T, I, const MIN_RANK: u16>(PhantomData<(T, I)>);
impl<T: Config<I>, I: 'static, const MIN_RANK: u16> EnsureOrigin<T::RuntimeOrigin>
for EnsureRankedMember<T, I, MIN_RANK>
Expand Down Expand Up @@ -430,7 +430,7 @@ pub mod pallet {
pub enum Event<T: Config<I>, I: 'static = ()> {
/// A member `who` has been added.
MemberAdded { who: T::AccountId },
/// The member `who`'s rank has been changed to the given `rank`.
/// The member `who`se rank has been changed to the given `rank`.
RankChanged { who: T::AccountId, rank: Rank },
/// The member `who` of given `rank` has been removed from the collective.
MemberRemoved { who: T::AccountId, rank: Rank },
Expand Down
6 changes: 3 additions & 3 deletions frame/referenda/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ pub mod pallet {
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config<I>, I: 'static = ()> {
/// A referendum has being submitted.
/// A referendum has been submitted.
Submitted {
/// Index of the referendum.
index: ReferendumIndex,
Expand Down Expand Up @@ -352,7 +352,7 @@ pub mod pallet {
HasDeposit,
/// The track identifier given was invalid.
BadTrack,
/// There are already a full complement of referendums in progress for this track.
/// There are already a full complement of referenda in progress for this track.
Full,
/// The queue of the track is empty.
QueueEmpty,
Expand Down Expand Up @@ -908,7 +908,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
///
/// In terms of storage, every call to it is expected to access:
/// - The scheduler, either to insert, remove or alter an entry;
/// - `TrackQueue`, which should be a `BoundedVec` with a low limit (8-16).
/// - `TrackQueue`, which should be a `BoundedVec` with a low limit (8-16);
/// - `DecidingCount`.
///
/// Both of the two storage items will only have as many items as there are different tracks,
Expand Down
4 changes: 2 additions & 2 deletions frame/referenda/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub struct ReferendumStatus<
pub(crate) proposal: Call,
/// The time the proposal should be scheduled for enactment.
pub(crate) enactment: DispatchTime<Moment>,
/// The time of submission. Once `UndecidingTimeout` passes, it may be closed by anyone if it
/// The time of submission. Once `UndecidingTimeout` passes, it may be closed by anyone if
/// `deciding` is `None`.
pub(crate) submitted: Moment,
/// The deposit reserved for the submission of this referendum.
Expand Down Expand Up @@ -224,7 +224,7 @@ pub enum ReferendumInfo<
Approved(Moment, Deposit<AccountId, Balance>, Option<Deposit<AccountId, Balance>>),
/// Referendum finished with rejection. Submission deposit is held.
Rejected(Moment, Deposit<AccountId, Balance>, Option<Deposit<AccountId, Balance>>),
/// Referendum finished with cancelation. Submission deposit is held.
/// Referendum finished with cancellation. Submission deposit is held.
Cancelled(Moment, Deposit<AccountId, Balance>, Option<Deposit<AccountId, Balance>>),
/// Referendum finished and was never decided. Submission deposit is held.
TimedOut(Moment, Deposit<AccountId, Balance>, Option<Deposit<AccountId, Balance>>),
Expand Down
4 changes: 2 additions & 2 deletions frame/whitelist/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
//! and allow another configurable origin: [`Config::DispatchWhitelistedOrigin`] to dispatch them
//! with the root origin.
//!
//! In the meantime the call corresponding to the hash must have been submitted to the to the
//! pre-image handler [`PreimageProvider`].
//! In the meantime the call corresponding to the hash must have been submitted to the pre-image
//! handler [`PreimageProvider`].

#![cfg_attr(not(feature = "std"), no_std)]

Expand Down

0 comments on commit 7035139

Please sign in to comment.