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
+3
View File
@@ -690,6 +690,7 @@ mod tests {
type AccountData = balances::AccountData<u64>;
type OnNewAccount = ();
type OnKilledAccount = Balances;
type SystemWeightInfo = ();
}
parameter_types! {
@@ -704,6 +705,7 @@ mod tests {
type DustRemoval = ();
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = ();
}
impl vesting::Trait for Test {
@@ -711,6 +713,7 @@ mod tests {
type Currency = Balances;
type BlockNumberToBalance = Identity;
type MinVestedTransfer = MinVestedTransfer;
type WeightInfo = ();
}
parameter_types!{
+3
View File
@@ -617,6 +617,7 @@ mod tests {
type AccountData = balances::AccountData<u64>;
type OnNewAccount = ();
type OnKilledAccount = Balances;
type SystemWeightInfo = ();
}
parameter_types! {
pub const ExistentialDeposit: u64 = 1;
@@ -627,6 +628,7 @@ mod tests {
type DustRemoval = ();
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = ();
}
parameter_types! {
@@ -667,6 +669,7 @@ mod tests {
type TipReportDepositBase = TipReportDepositBase;
type TipReportDepositPerByte = TipReportDepositPerByte;
type ModuleId = TreasuryModuleId;
type WeightInfo = ();
}
thread_local! {
+1
View File
@@ -141,6 +141,7 @@ mod multiplier_tests {
type AccountData = ();
type OnNewAccount = ();
type OnKilledAccount = ();
type SystemWeightInfo = ();
}
type System = system::Module<Runtime>;
@@ -1760,6 +1760,7 @@ mod tests {
type AccountData = balances::AccountData<u128>;
type OnNewAccount = ();
type OnKilledAccount = ();
type SystemWeightInfo = ();
}
impl<C> system::offchain::SendTransactionTypes<C> for Test where
@@ -1799,6 +1800,7 @@ mod tests {
type SessionHandler = TestSessionHandler;
type Keys = TestSessionKeys;
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
type WeightInfo = ();
}
impl session::historical::Trait for Test {
@@ -1813,6 +1815,7 @@ mod tests {
type Moment = u64;
type OnTimestampSet = ();
type MinimumPeriod = MinimumPeriod;
type WeightInfo = ();
}
mod time {
@@ -1860,6 +1863,7 @@ mod tests {
type Event = ();
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = ();
}
pallet_staking_reward_curve::build! {
@@ -1915,6 +1919,7 @@ mod tests {
type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = ();
type MinSolutionScoreBump = ();
type WeightInfo = ();
}
impl attestations::Trait for Test {
@@ -1962,6 +1967,7 @@ mod tests {
type IdentificationTuple = session::historical::IdentificationTuple<Self>;
type OnOffenceHandler = Staking;
type WeightSoftLimit = OffencesWeightSoftLimit;
type WeightInfo = ();
}
parameter_types! {
+5
View File
@@ -747,6 +747,7 @@ mod tests {
type AccountData = balances::AccountData<u128>;
type OnNewAccount = ();
type OnKilledAccount = Balances;
type SystemWeightInfo = ();
}
impl<C> system::offchain::SendTransactionTypes<C> for Test where
@@ -766,6 +767,7 @@ mod tests {
type Event = ();
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = ();
}
parameter_types!{
@@ -814,6 +816,7 @@ mod tests {
type ValidatorId = u64;
type ValidatorIdOf = ();
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
type WeightInfo = ();
}
parameter_types! {
@@ -848,12 +851,14 @@ mod tests {
type UnsignedPriority = StakingUnsignedPriority;
type MaxIterations = ();
type MinSolutionScoreBump = ();
type WeightInfo = ();
}
impl timestamp::Trait for Test {
type Moment = u64;
type OnTimestampSet = ();
type MinimumPeriod = MinimumPeriod;
type WeightInfo = ();
}
impl session::historical::Trait for Test {
+2
View File
@@ -933,6 +933,7 @@ mod tests {
type AccountData = balances::AccountData<u64>;
type OnNewAccount = ();
type OnKilledAccount = Balances;
type SystemWeightInfo = ();
}
parameter_types! {
@@ -945,6 +946,7 @@ mod tests {
type DustRemoval = ();
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = ();
}
thread_local! {