Add WeightInfo to all pallets with benchmarks. (#6575)

* Start adding weight info

* More weightinfo

* finish weight info

* more fixes

* inital update of node runtime

* fix the rest of the compilation

* update balances

* add docs

* fix balances tests

* Fix more tests

* Fix compile

* Fix pallet-evm tests
This commit is contained in:
Shawn Tabrizi
2020-07-08 18:22:01 +02:00
committed by GitHub
parent 94cddee160
commit 2302898b8a
65 changed files with 632 additions and 7 deletions
@@ -81,6 +81,7 @@ impl frame_system::Trait for Test {
type AccountData = pallet_balances::AccountData<u64>;
type OnNewAccount = ();
type OnKilledAccount = (Balances,);
type SystemWeightInfo = ();
}
parameter_types! {
pub const ExistentialDeposit: Balance = 10;
@@ -91,12 +92,14 @@ impl pallet_balances::Trait for Test {
type DustRemoval = ();
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = ();
}
impl pallet_indices::Trait for Test {
type AccountIndex = AccountIndex;
type Event = ();
type Currency = Balances;
type Deposit = ();
type WeightInfo = ();
}
parameter_types! {
pub const MinimumPeriod: u64 = 5;
@@ -105,6 +108,7 @@ impl pallet_timestamp::Trait for Test {
type Moment = u64;
type OnTimestampSet = ();
type MinimumPeriod = MinimumPeriod;
type WeightInfo = ();
}
impl pallet_session::historical::Trait for Test {
type FullIdentification = pallet_staking::Exposure<AccountId, Balance>;
@@ -142,6 +146,7 @@ impl pallet_session::Trait for Test {
type ValidatorId = AccountId;
type ValidatorIdOf = pallet_staking::StashOf<Test>;
type DisabledValidatorsThreshold = ();
type WeightInfo = ();
}
pallet_staking_reward_curve::build! {
const I_NPOS: sp_runtime::curve::PiecewiseLinear<'static> = curve!(
@@ -189,4 +194,5 @@ impl pallet_staking::Trait for Test {
type MinSolutionScoreBump = ();
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
type UnsignedPriority = ();
type WeightInfo = ();
}