Update elections-phragmen weight to WeightInfo (#7161)

* Update elections-phragmen weight to WeightInfo

* Fix benchmark tests

* Update weights

* Update test

* Update another thest :"

* Weights from benchmarking machine

./substrate2/target/release/substrate benchmark --chain dev --steps 50 --repeat 20 --pallet pallet_elections_phragmen --extrinsic "*" --raw --execution=wasm --wasm-execution=compiled --output

* Update weights from the benchmarking machine

* Fix tests one last time

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Kian Paimani
2020-09-22 14:06:15 +02:00
committed by GitHub
parent fc77d1d466
commit f70ef87a0c
7 changed files with 336 additions and 128 deletions
+14 -7
View File
@@ -234,13 +234,20 @@ impl InstanceFilter<Call> for ProxyType {
fn filter(&self, c: &Call) -> bool {
match self {
ProxyType::Any => true,
ProxyType::NonTransfer => !matches!(c,
Call::Balances(..) | Call::Vesting(pallet_vesting::Call::vested_transfer(..))
| Call::Indices(pallet_indices::Call::transfer(..))
ProxyType::NonTransfer => !matches!(
c,
Call::Balances(..) |
Call::Vesting(pallet_vesting::Call::vested_transfer(..)) |
Call::Indices(pallet_indices::Call::transfer(..))
),
ProxyType::Governance => matches!(c,
Call::Democracy(..) | Call::Council(..) | Call::Society(..)
| Call::TechnicalCommittee(..) | Call::Elections(..) | Call::Treasury(..)
ProxyType::Governance => matches!(
c,
Call::Democracy(..) |
Call::Council(..) |
Call::Society(..) |
Call::TechnicalCommittee(..) |
Call::Elections(..) |
Call::Treasury(..)
),
ProxyType::Staking => matches!(c, Call::Staking(..)),
}
@@ -561,7 +568,7 @@ impl pallet_elections_phragmen::Trait for Runtime {
type DesiredMembers = DesiredMembers;
type DesiredRunnersUp = DesiredRunnersUp;
type TermDuration = TermDuration;
type WeightInfo = ();
type WeightInfo = weights::pallet_elections_phragmen::WeightInfo;
}
parameter_types! {