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 -3
View File
@@ -27,7 +27,7 @@ use frame_support::traits::{FindAuthor, VerifySeal, Get};
use codec::{Encode, Decode};
use frame_system::ensure_none;
use sp_runtime::traits::{Header as HeaderT, One, Zero};
use frame_support::weights::{Weight, SimpleDispatchInfo, WeighData};
use frame_support::weights::{Weight, MINIMUM_WEIGHT, SimpleDispatchInfo};
use sp_inherents::{InherentIdentifier, ProvideInherent, InherentData};
use sp_authorship::{INHERENT_IDENTIFIER, UnclesInherentData, InherentError};
@@ -197,7 +197,7 @@ decl_module! {
T::EventHandler::note_author(Self::author());
SimpleDispatchInfo::default().weigh_data(())
MINIMUM_WEIGHT
}
fn on_finalize() {
@@ -207,7 +207,7 @@ decl_module! {
}
/// Provide a set of uncles.
#[weight = SimpleDispatchInfo::FixedMandatory(10_000)]
#[weight = SimpleDispatchInfo::FixedMandatory(MINIMUM_WEIGHT)]
fn set_uncles(origin, new_uncles: Vec<T::Header>) -> dispatch::DispatchResult {
ensure_none(origin)?;
ensure!(new_uncles.len() <= MAX_UNCLES, Error::<T>::TooManyUncles);
@@ -429,6 +429,7 @@ mod tests {
type Event = ();
type BlockHashCount = BlockHashCount;
type MaximumBlockWeight = MaximumBlockWeight;
type DbWeight = ();
type AvailableBlockRatio = AvailableBlockRatio;
type MaximumBlockLength = MaximumBlockLength;
type Version = ();