mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
Benchmark Offences Pallet (#5411)
* Add initial report_ofence bench. * Remove unused imports * Style nit * Add nominators * Remove logs. * Nits. * Add nominators param. * Reorg, comment. * Remove whitespaces. * Apply review suggestion: move benchmark to own crate. * Remove import. * Remove line. * Add feature flag. * Pass can_report. * Cleaning up. * More cleaning
This commit is contained in:
@@ -44,7 +44,7 @@ type OpaqueTimeSlot = Vec<u8>;
|
||||
type ReportIdOf<T> = <T as frame_system::Trait>::Hash;
|
||||
|
||||
/// Type of data stored as a deferred offence
|
||||
type DeferredOffenceOf<T> = (
|
||||
pub type DeferredOffenceOf<T> = (
|
||||
Vec<OffenceDetails<<T as frame_system::Trait>::AccountId, <T as Trait>::IdentificationTuple>>,
|
||||
Vec<Perbill>,
|
||||
SessionIndex,
|
||||
@@ -249,6 +249,11 @@ impl<T: Trait> Module<T> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub fn set_deferred_offences(offences: Vec<DeferredOffenceOf<T>>) {
|
||||
<DeferredOffences<T>>::put(offences);
|
||||
}
|
||||
}
|
||||
|
||||
struct TriageOutcome<T: Trait> {
|
||||
|
||||
Reference in New Issue
Block a user