Companion for substrate/pull/8596 (#2895)

* Add weight types

* Add missing types

* update Substrate

* Fix build

* Fix bench build

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_membership --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/

Co-authored-by: parity-processbot <>
Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
Kian Paimani
2021-04-18 10:39:34 +02:00
committed by GitHub
parent dacde443f7
commit c384f70067
10 changed files with 257 additions and 178 deletions
@@ -257,7 +257,7 @@ impl<T: Config> ProvideInherent for Module<T> {
Some(Call::enter(inherent_data))
}
fn is_inherent(call: &Self::Call) -> bool {
matches!(call, Call::enter(..))
}
@@ -244,8 +244,8 @@ pub fn relevant_authority_ids<T: initializer::Config + pallet_authority_discover
// Due to `max_validators`, the `SessionInfo` stores only the validators who are actively
// selected to participate in parachain consensus. We'd like all authorities for the current
// and next sessions to be used in authority-discovery. The two sets likely have large overlap.
let mut authority_ids = <pallet_authority_discovery::Module<T>>::current_authorities();
authority_ids.extend(<pallet_authority_discovery::Module<T>>::next_authorities());
let mut authority_ids = <pallet_authority_discovery::Pallet<T>>::current_authorities();
authority_ids.extend(<pallet_authority_discovery::Pallet<T>>::next_authorities());
// Due to disputes, we'd like to remain connected to authorities of the previous few sessions.
// For this, we don't need anyone other than the validators actively participating in consensus.
@@ -73,7 +73,7 @@ pub trait AuthorityDiscoveryConfig {
impl<T: pallet_authority_discovery::Config> AuthorityDiscoveryConfig for T {
fn authorities() -> Vec<AuthorityDiscoveryId> {
<pallet_authority_discovery::Module<T>>::current_authorities()
<pallet_authority_discovery::Pallet<T>>::current_authorities()
}
}