mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
Weights to u64 + Balances Weights (#5446)
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -110,7 +110,7 @@ use frame_support::{
|
||||
Get, FindAuthor, ValidatorRegistration, EstimateNextSessionRotation, EstimateNextNewSession,
|
||||
},
|
||||
dispatch::{self, DispatchResult, DispatchError},
|
||||
weights::{Weight, SimpleDispatchInfo, WeighData},
|
||||
weights::{Weight, MINIMUM_WEIGHT, SimpleDispatchInfo},
|
||||
};
|
||||
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)]
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(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)]
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(150_000_000)]
|
||||
pub fn purge_keys(origin) {
|
||||
let who = ensure_signed(origin)?;
|
||||
Self::do_purge_keys(&who)?;
|
||||
@@ -532,7 +532,7 @@ decl_module! {
|
||||
Self::rotate_session();
|
||||
}
|
||||
|
||||
SimpleDispatchInfo::default().weigh_data(())
|
||||
MINIMUM_WEIGHT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,6 +184,7 @@ impl frame_system::Trait for Test {
|
||||
type Event = ();
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type MaximumBlockWeight = MaximumBlockWeight;
|
||||
type DbWeight = ();
|
||||
type AvailableBlockRatio = AvailableBlockRatio;
|
||||
type MaximumBlockLength = MaximumBlockLength;
|
||||
type Version = ();
|
||||
|
||||
Reference in New Issue
Block a user