WeightInfo for Session Pallet (#7136)

* whitelist caller in benchmarks

* remove unused component

* Add benchmark weights

* Remove `weightinfo` for `offences`
This commit is contained in:
Shawn Tabrizi
2020-09-21 11:13:31 +02:00
committed by GitHub
parent ae52587f41
commit 9e9e34fad8
11 changed files with 93 additions and 24 deletions
+1 -3
View File
@@ -77,8 +77,6 @@ pub trait Trait: frame_system::Trait {
/// `on_initialize`.
/// Note it's going to be exceeded before we stop adding to it, so it has to be set conservatively.
type WeightSoftLimit: Get<Weight>;
/// Weight information for extrinsics in this pallet.
type WeightInfo: WeightInfo;
}
decl_storage! {
@@ -111,7 +109,7 @@ decl_event!(
pub enum Event {
/// There is an offence reported of the given `kind` happened at the `session_index` and
/// (kind-specific) time slot. This event is not deposited for duplicate slashes. last
/// element indicates of the offence was applied (true) or queued (false)
/// element indicates of the offence was applied (true) or queued (false)
/// \[kind, timeslot, applied\].
Offence(Kind, OpaqueTimeSlot, bool),
}
-1
View File
@@ -132,7 +132,6 @@ impl Trait for Runtime {
type IdentificationTuple = u64;
type OnOffenceHandler = OnOffenceHandler;
type WeightSoftLimit = OffencesWeightSoftLimit;
type WeightInfo = ();
}
mod offences {