mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
offences: make fn slash_fraction non-static (#11956)
* offences: make fn slash_fraction non-static * Bastifmt (inline variable)
This commit is contained in:
@@ -288,15 +288,13 @@ benchmarks! {
|
||||
let (offenders, raw_offenders) = make_offenders_im_online::<T>(o, n)?;
|
||||
let keys = ImOnline::<T>::keys();
|
||||
let validator_set_count = keys.len() as u32;
|
||||
|
||||
let slash_fraction = UnresponsivenessOffence::<T::AccountId>::slash_fraction(
|
||||
offenders.len() as u32, validator_set_count,
|
||||
);
|
||||
let offenders_count = offenders.len() as u32;
|
||||
let offence = UnresponsivenessOffence {
|
||||
session_index: 0,
|
||||
validator_set_count,
|
||||
offenders,
|
||||
};
|
||||
let slash_fraction = offence.slash_fraction(offenders_count);
|
||||
assert_eq!(System::<T>::event_count(), 0);
|
||||
}: {
|
||||
let _ = <T as ImOnlineConfig>::ReportUnresponsiveness::report_offence(
|
||||
|
||||
Reference in New Issue
Block a user