Rewrap all comments to 100 line width (#9490)

* reformat everything again

* manual formatting

* last manual fix

* Fix build
This commit is contained in:
Kian Paimani
2021-08-11 16:56:55 +02:00
committed by GitHub
parent 8180c58700
commit abd08e29ce
258 changed files with 1776 additions and 1447 deletions
+12 -11
View File
@@ -73,8 +73,8 @@ mod tests;
// - remove inactive voter (either you or the target is removed; if the target, you get their
// "voter" bond back; O(1); one fewer DB entry, one DB change)
// - submit candidacy (you pay a "candidate" bond; O(1); one extra DB entry, two DB changes)
// - present winner/runner-up (you may pay a "presentation" bond of O(voters) if the presentation
// is invalid; O(voters) compute; ) protected operations:
// - present winner/runner-up (you may pay a "presentation" bond of O(voters) if the presentation is
// invalid; O(voters) compute; ) protected operations:
// - remove candidacy (remove all votes for a candidate) (one fewer DB entry, two DB changes)
// to avoid a potentially problematic case of not-enough approvals prior to voting causing a
@@ -128,8 +128,8 @@ pub struct VoterInfo<Balance> {
/// Used to demonstrate the status of a particular index in the global voter list.
#[derive(PartialEq, Eq, RuntimeDebug)]
pub enum CellStatus {
/// Any out of bound index. Means a push a must happen to the chunk pointed by `NextVoterSet<T>`.
/// Voting fee is applied in case a new chunk is created.
/// Any out of bound index. Means a push a must happen to the chunk pointed by
/// `NextVoterSet<T>`. Voting fee is applied in case a new chunk is created.
Head,
/// Already occupied by another voter. Voting fee is applied.
Occupied,
@@ -850,13 +850,14 @@ impl<T: Config> Pallet<T> {
None
} else {
let c = Self::members();
let (next_possible, count, coming) =
if let Some((tally_end, comers, leavers)) = Self::next_finalize() {
// if there's a tally in progress, then next tally can begin immediately afterwards
(tally_end, c.len() - leavers.len() + comers as usize, comers)
} else {
(<frame_system::Pallet<T>>::block_number(), c.len(), 0)
};
let (next_possible, count, coming) = if let Some((tally_end, comers, leavers)) =
Self::next_finalize()
{
// if there's a tally in progress, then next tally can begin immediately afterwards
(tally_end, c.len() - leavers.len() + comers as usize, comers)
} else {
(<frame_system::Pallet<T>>::block_number(), c.len(), 0)
};
if count < desired_seats as usize {
Some(next_possible)
} else {