mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 10:27:59 +00:00
pallet-offences: Switch to partition_point (#9049)
This changes the code to use `partition_point` instead of `binary_search_by_key`, because this was very likely the problematic pallet 2 weeks ago on polkadot.
This commit is contained in:
@@ -170,3 +170,8 @@ impl<T: Clone> offence::Offence<T> for Offence<T> {
|
||||
Perbill::from_percent(5 + offenders_count * 100 / validator_set_count)
|
||||
}
|
||||
}
|
||||
|
||||
/// Create the report id for the given `offender` and `time_slot` combination.
|
||||
pub fn report_id(time_slot: u128, offender: u64) -> H256 {
|
||||
Offences::report_id::<Offence<u64>>(&time_slot, &offender)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user