mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 02:08:02 +00:00
Uniform pallet warnings (#13798)
* Use proc-macro-warning crate Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fixup Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix pallet_ui tests Also renamed some of the odd-named ones. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update dep Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Ignore hardcoded weight warning To be fixed in https://github.com/paritytech/substrate/issues/13813 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix test pallet Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix more tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
846ec8cd01
commit
07dcd47d59
@@ -70,7 +70,7 @@
|
||||
//!
|
||||
//! #[pallet::call]
|
||||
//! impl<T: Config> Pallet<T> {
|
||||
//! #[pallet::weight(0)]
|
||||
//! #[pallet::weight({0})]
|
||||
//! pub fn candidate(origin: OriginFor<T>) -> DispatchResult {
|
||||
//! let who = ensure_signed(origin)?;
|
||||
//!
|
||||
@@ -311,7 +311,7 @@ pub mod pallet {
|
||||
/// The `index` parameter of this function must be set to
|
||||
/// the index of the transactor in the `Pool`.
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::weight({0})]
|
||||
pub fn submit_candidacy(origin: OriginFor<T>) -> DispatchResult {
|
||||
let who = ensure_signed(origin)?;
|
||||
ensure!(!<CandidateExists<T, I>>::contains_key(&who), Error::<T, I>::AlreadyInPool);
|
||||
@@ -341,7 +341,7 @@ pub mod pallet {
|
||||
/// The `index` parameter of this function must be set to
|
||||
/// the index of the transactor in the `Pool`.
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::weight({0})]
|
||||
pub fn withdraw_candidacy(origin: OriginFor<T>, index: u32) -> DispatchResult {
|
||||
let who = ensure_signed(origin)?;
|
||||
|
||||
@@ -360,7 +360,7 @@ pub mod pallet {
|
||||
/// The `index` parameter of this function must be set to
|
||||
/// the index of `dest` in the `Pool`.
|
||||
#[pallet::call_index(2)]
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::weight({0})]
|
||||
pub fn kick(
|
||||
origin: OriginFor<T>,
|
||||
dest: AccountIdLookupOf<T>,
|
||||
@@ -385,7 +385,7 @@ pub mod pallet {
|
||||
/// The `index` parameter of this function must be set to
|
||||
/// the index of the `dest` in the `Pool`.
|
||||
#[pallet::call_index(3)]
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::weight({0})]
|
||||
pub fn score(
|
||||
origin: OriginFor<T>,
|
||||
dest: AccountIdLookupOf<T>,
|
||||
@@ -425,7 +425,7 @@ pub mod pallet {
|
||||
///
|
||||
/// May only be called from root.
|
||||
#[pallet::call_index(4)]
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::weight({0})]
|
||||
pub fn change_member_count(origin: OriginFor<T>, count: u32) -> DispatchResult {
|
||||
ensure_root(origin)?;
|
||||
Self::update_member_count(count).map_err(Into::into)
|
||||
|
||||
Reference in New Issue
Block a user