Update stale docstring with 'EnsureOneOf' introduced. (#6501)

* Update stale docstring with 'EnsureOneOf' introduced.

* Apply review suggestions.
This commit is contained in:
Shaopeng Wang
2020-06-25 21:33:47 +12:00
committed by GitHub
parent 44fb311f1f
commit 1813ba215e
6 changed files with 20 additions and 12 deletions
+2 -2
View File
@@ -622,7 +622,7 @@ decl_module! {
/// Add a registrar to the system.
///
/// The dispatch origin for this call must be `RegistrarOrigin` or `Root`.
/// The dispatch origin for this call must be `T::RegistrarOrigin`.
///
/// - `account`: the account of the registrar.
///
@@ -1087,7 +1087,7 @@ decl_module! {
/// `Slash`. Verification request deposits are not returned; they should be cancelled
/// manually using `cancel_request`.
///
/// The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`.
/// The dispatch origin for this call must match `T::ForceOrigin`.
///
/// - `target`: the account whose identity the judgement is upon. This must be an account
/// with a registered identity.
+8 -4
View File
@@ -117,7 +117,7 @@ decl_module! {
/// Add a member `who` to the set.
///
/// May only be called from `AddOrigin` or root.
/// May only be called from `T::AddOrigin`.
#[weight = 50_000_000]
pub fn add_member(origin, who: T::AccountId) {
T::AddOrigin::ensure_origin(origin)?;
@@ -134,7 +134,7 @@ decl_module! {
/// Remove a member `who` from the set.
///
/// May only be called from `RemoveOrigin` or root.
/// May only be called from `T::RemoveOrigin`.
#[weight = 50_000_000]
pub fn remove_member(origin, who: T::AccountId) {
T::RemoveOrigin::ensure_origin(origin)?;
@@ -152,7 +152,7 @@ decl_module! {
/// Swap out one member `remove` for another `add`.
///
/// May only be called from `SwapOrigin` or root.
/// May only be called from `T::SwapOrigin`.
///
/// Prime membership is *not* passed from `remove` to `add`, if extant.
#[weight = 50_000_000]
@@ -181,7 +181,7 @@ decl_module! {
/// Change the membership to a new set, disregarding the existing membership. Be nice and
/// pass `members` pre-sorted.
///
/// May only be called from `ResetOrigin` or root.
/// May only be called from `T::ResetOrigin`.
#[weight = 50_000_000]
pub fn reset_members(origin, members: Vec<T::AccountId>) {
T::ResetOrigin::ensure_origin(origin)?;
@@ -231,6 +231,8 @@ decl_module! {
}
/// Set the prime member. Must be a current member.
///
/// May only be called from `T::PrimeOrigin`.
#[weight = 50_000_000]
pub fn set_prime(origin, who: T::AccountId) {
T::PrimeOrigin::ensure_origin(origin)?;
@@ -240,6 +242,8 @@ decl_module! {
}
/// Remove the prime member if it exists.
///
/// May only be called from `T::PrimeOrigin`.
#[weight = 50_000_000]
pub fn clear_prime(origin) {
T::PrimeOrigin::ensure_origin(origin)?;
+2 -2
View File
@@ -187,7 +187,7 @@ decl_module! {
/// Fails if `who` has not been named. The deposit is dealt with through `T::Slashed`
/// imbalance handler.
///
/// The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`.
/// The dispatch origin for this call must match `T::ForceOrigin`.
///
/// # <weight>
/// - O(1).
@@ -213,7 +213,7 @@ decl_module! {
///
/// No length checking is done on the name.
///
/// The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`.
/// The dispatch origin for this call must match `T::ForceOrigin`.
///
/// # <weight>
/// - O(1).
+2 -2
View File
@@ -308,7 +308,7 @@ decl_module! {
/// Kick a member `who` from the set.
///
/// May only be called from `KickOrigin` or root.
/// May only be called from `T::KickOrigin`.
///
/// The `index` parameter of this function must be set to
/// the index of `dest` in the `Pool`.
@@ -331,7 +331,7 @@ decl_module! {
/// Score a member `who` with `score`.
///
/// May only be called from `ScoreOrigin` or root.
/// May only be called from `T::ScoreOrigin`.
///
/// The `index` parameter of this function must be set to
/// the index of the `dest` in the `Pool`.
+1 -1
View File
@@ -1928,7 +1928,7 @@ decl_module! {
/// Cancel enactment of a deferred slash.
///
/// Can be called by either the root origin or the `T::SlashCancelOrigin`.
/// Can be called by the `T::SlashCancelOrigin`.
///
/// Parameters: era and indices of the slashes for that era to kill.
///
+5 -1
View File
@@ -316,7 +316,7 @@ decl_module! {
/// The amount held on deposit per byte within the tip report reason.
const TipReportDepositPerByte: BalanceOf<T> = T::TipReportDepositPerByte::get();
/// The treasury's module id, used for deriving its sovereign account ID.
const ModuleId: ModuleId = T::ModuleId::get();
@@ -355,6 +355,8 @@ decl_module! {
/// Reject a proposed spend. The original deposit will be slashed.
///
/// May only be called from `T::RejectOrigin`.
///
/// # <weight>
/// - Complexity: O(1)
/// - DbReads: `Proposals`, `rejected proposer account`
@@ -375,6 +377,8 @@ decl_module! {
/// Approve a proposal. At a later time, the proposal will be allocated to the beneficiary
/// and the original deposit will be returned.
///
/// May only be called from `T::ApproveOrigin`.
///
/// # <weight>
/// - Complexity: O(1).
/// - DbReads: `Proposals`, `Approvals`