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
+5 -4
View File
@@ -141,7 +141,7 @@ decl_module! {
/// - One storage read/write.
/// - One event.
/// # </weight>
#[weight = SimpleDispatchInfo::FixedNormal(50_000)]
#[weight = SimpleDispatchInfo::FixedNormal(50_000_000)]
fn set_name(origin, name: Vec<u8>) {
let sender = ensure_signed(origin)?;
@@ -171,7 +171,7 @@ decl_module! {
/// - One storage read/write.
/// - One event.
/// # </weight>
#[weight = SimpleDispatchInfo::FixedNormal(70_000)]
#[weight = SimpleDispatchInfo::FixedNormal(70_000_000)]
fn clear_name(origin) {
let sender = ensure_signed(origin)?;
@@ -195,7 +195,7 @@ decl_module! {
/// - One storage read/write.
/// - One event.
/// # </weight>
#[weight = SimpleDispatchInfo::FixedNormal(70_000)]
#[weight = SimpleDispatchInfo::FixedNormal(70_000_000)]
fn kill_name(origin, target: <T::Lookup as StaticLookup>::Source) {
T::ForceOrigin::try_origin(origin)
.map(|_| ())
@@ -223,7 +223,7 @@ decl_module! {
/// - One storage read/write.
/// - One event.
/// # </weight>
#[weight = SimpleDispatchInfo::FixedNormal(70_000)]
#[weight = SimpleDispatchInfo::FixedNormal(70_000_000)]
fn force_name(origin, target: <T::Lookup as StaticLookup>::Source, name: Vec<u8>) {
T::ForceOrigin::try_origin(origin)
.map(|_| ())
@@ -282,6 +282,7 @@ mod tests {
type Event = ();
type BlockHashCount = BlockHashCount;
type MaximumBlockWeight = MaximumBlockWeight;
type DbWeight = ();
type MaximumBlockLength = MaximumBlockLength;
type AvailableBlockRatio = AvailableBlockRatio;
type Version = ();