Weights to u64 + Balances Weights (#5446)

Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
Shawn Tabrizi
2020-04-16 10:43:18 +02:00
committed by GitHub
parent 1c7525fd4b
commit 980b635c8d
82 changed files with 636 additions and 428 deletions
+4 -4
View File
@@ -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
}
}
}
+1
View File
@@ -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 = ();