mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +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:
@@ -231,10 +231,15 @@ impl staking::Trait for Test {
|
||||
type MaxIterations = ();
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get();
|
||||
}
|
||||
|
||||
impl offences::Trait for Test {
|
||||
type Event = TestEvent;
|
||||
type IdentificationTuple = session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
type WeightSoftLimit = OffencesWeightSoftLimit;
|
||||
}
|
||||
|
||||
impl Trait for Test {
|
||||
|
||||
Reference in New Issue
Block a user