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:
Marcio Diaz
2020-04-07 11:36:57 +02:00
committed by GitHub
parent d3cc051419
commit fb9bbf306d
10 changed files with 463 additions and 205 deletions
+3 -3
View File
@@ -679,11 +679,11 @@ pub struct UnresponsivenessOffence<Offender> {
///
/// It acts as a time measure for unresponsiveness reports and effectively will always point
/// at the end of the session.
session_index: SessionIndex,
pub session_index: SessionIndex,
/// The size of the validator set in current session/era.
validator_set_count: u32,
pub validator_set_count: u32,
/// Authorities that were unresponsive during the current era.
offenders: Vec<Offender>,
pub offenders: Vec<Offender>,
}
impl<Offender: Clone> Offence<Offender> for UnresponsivenessOffence<Offender> {