Companion for #6575 (Add WeightInfo) (#1352)

* Add `WeightInfo`

* fix test

* fix tests

* fix more tests
This commit is contained in:
Shawn Tabrizi
2020-07-08 18:22:22 +02:00
committed by GitHub
parent 283ffd4ec4
commit 099e41dc9e
11 changed files with 82 additions and 1 deletions
+9
View File
@@ -155,6 +155,7 @@ impl system::Trait for Runtime {
type AccountData = balances::AccountData<Balance>;
type OnNewAccount = ();
type OnKilledAccount = ();
type SystemWeightInfo = ();
}
impl<C> system::offchain::SendTransactionTypes<C> for Runtime where
@@ -200,6 +201,7 @@ impl indices::Trait for Runtime {
type Currency = Balances;
type Deposit = IndexDeposit;
type Event = Event;
type WeightInfo = ();
}
parameter_types! {
@@ -212,6 +214,7 @@ impl balances::Trait for Runtime {
type Event = Event;
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = ();
}
parameter_types! {
@@ -233,6 +236,7 @@ impl timestamp::Trait for Runtime {
type Moment = u64;
type OnTimestampSet = Babe;
type MinimumPeriod = MinimumPeriod;
type WeightInfo = ();
}
parameter_types! {
@@ -274,6 +278,7 @@ impl session::Trait for Runtime {
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
type WeightInfo = ();
}
impl session::historical::Trait for Runtime {
@@ -329,6 +334,8 @@ impl staking::Trait for Runtime {
type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = MaxIterations;
type MinSolutionScoreBump = MinSolutionScoreBump;
type WeightInfo = ();
}
impl grandpa::Trait for Runtime {
@@ -448,6 +455,7 @@ impl offences::Trait for Runtime {
type IdentificationTuple = session::historical::IdentificationTuple<Self>;
type OnOffenceHandler = Staking;
type WeightSoftLimit = OffencesWeightSoftLimit;
type WeightInfo = ();
}
parameter_types! {
@@ -500,6 +508,7 @@ impl vesting::Trait for Runtime {
type Currency = Balances;
type BlockNumberToBalance = ConvertInto;
type MinVestedTransfer = MinVestedTransfer;
type WeightInfo = ();
}
construct_runtime! {