mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Migrate away from SimpleDispatchInfo (#5686)
* Migrate away from SimpleDispatchInfo * Fix imports * Better doc * Update lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -110,7 +110,7 @@ use frame_support::{
|
||||
Get, FindAuthor, ValidatorRegistration, EstimateNextSessionRotation, EstimateNextNewSession,
|
||||
},
|
||||
dispatch::{self, DispatchResult, DispatchError},
|
||||
weights::{Weight, MINIMUM_WEIGHT, SimpleDispatchInfo},
|
||||
weights::{Weight, MINIMUM_WEIGHT},
|
||||
};
|
||||
use frame_system::{self as system, ensure_signed};
|
||||
|
||||
@@ -498,7 +498,7 @@ decl_module! {
|
||||
/// - Increases system account refs by one on success iff there were previously no keys set.
|
||||
/// In this case, purge_keys will need to be called before the account can be removed.
|
||||
/// # </weight>
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(150_000_000)]
|
||||
#[weight = 150_000_000]
|
||||
pub fn set_keys(origin, keys: T::Keys, proof: Vec<u8>) -> dispatch::DispatchResult {
|
||||
let who = ensure_signed(origin)?;
|
||||
|
||||
@@ -519,7 +519,7 @@ decl_module! {
|
||||
/// - Removes N + 1 DB entries.
|
||||
/// - Reduces system account refs by one on success.
|
||||
/// # </weight>
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(150_000_000)]
|
||||
#[weight = 150_000_000]
|
||||
pub fn purge_keys(origin) {
|
||||
let who = ensure_signed(origin)?;
|
||||
Self::do_purge_keys(&who)?;
|
||||
|
||||
Reference in New Issue
Block a user