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
+2 -2
View File
@@ -191,8 +191,8 @@ decl_storage! {
<CandidateExists<T, I>>::insert(who, true);
});
/// Sorts the `Pool` by score in a descending order. Entities which
/// have a score of `None` are sorted to the beginning of the vec.
// Sorts the `Pool` by score in a descending order. Entities which
// have a score of `None` are sorted to the beginning of the vec.
pool.sort_by_key(|(_, maybe_score)|
Reverse(maybe_score.unwrap_or_default())
);