mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Offences Weight for OnInitialize (#5961)
* Weight accounting for on_offence. * Try to compute weight. * Guesstimate upper bounds on db read/writes for slashing * greater than or equal to * add new trait * Update mock.rs * Add basic weight test * one more test * Update frame/staking/src/lib.rs Co-authored-by: thiolliere <gui.thiolliere@gmail.com> * Update frame/staking/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Add test for offences queue Co-authored-by: Tomasz Drwięga <tomasz@parity.io> Co-authored-by: thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -584,10 +584,15 @@ impl pallet_im_online::Trait for Runtime {
|
||||
type UnsignedPriority = ImOnlineUnsignedPriority;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get();
|
||||
}
|
||||
|
||||
impl pallet_offences::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
type WeightSoftLimit = OffencesWeightSoftLimit;
|
||||
}
|
||||
|
||||
impl pallet_authority_discovery::Trait for Runtime {}
|
||||
|
||||
Reference in New Issue
Block a user