mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
Offence implementations can disable offenders independently from slashing (#10201)
* Offence implementations can disable offenders independently from slashing * Fix build on CI * Run cargo fmt * Fixes based on review comments * Make parameter naming consistent * Fix migration and some English * Fix migration - again * cargo fmt * Cover 2 new cases with a test
This commit is contained in:
@@ -36,7 +36,7 @@ use sp_runtime::{
|
||||
Perbill,
|
||||
};
|
||||
use sp_staking::{
|
||||
offence::{OffenceDetails, OnOffenceHandler},
|
||||
offence::{DisableStrategy, OffenceDetails, OnOffenceHandler},
|
||||
SessionIndex,
|
||||
};
|
||||
use sp_std::{collections::btree_map::BTreeMap, prelude::*};
|
||||
@@ -1137,6 +1137,7 @@ where
|
||||
>],
|
||||
slash_fraction: &[Perbill],
|
||||
slash_session: SessionIndex,
|
||||
disable_strategy: DisableStrategy,
|
||||
) -> Weight {
|
||||
let reward_proportion = SlashRewardFraction::<T>::get();
|
||||
let mut consumed_weight: Weight = 0;
|
||||
@@ -1206,6 +1207,7 @@ where
|
||||
window_start,
|
||||
now: active_era,
|
||||
reward_proportion,
|
||||
disable_strategy,
|
||||
});
|
||||
|
||||
if let Some(mut unapplied) = unapplied {
|
||||
|
||||
Reference in New Issue
Block a user