mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +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::{self, Kind, OffenceDetails},
|
||||
offence::{self, DisableStrategy, Kind, OffenceDetails},
|
||||
SessionIndex,
|
||||
};
|
||||
use std::cell::RefCell;
|
||||
@@ -55,6 +55,7 @@ impl<Reporter, Offender> offence::OnOffenceHandler<Reporter, Offender, Weight>
|
||||
_offenders: &[OffenceDetails<Reporter, Offender>],
|
||||
slash_fraction: &[Perbill],
|
||||
_offence_session: SessionIndex,
|
||||
_disable_strategy: DisableStrategy,
|
||||
) -> Weight {
|
||||
ON_OFFENCE_PERBILL.with(|f| {
|
||||
*f.borrow_mut() = slash_fraction.to_vec();
|
||||
|
||||
Reference in New Issue
Block a user