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
@@ -165,8 +165,8 @@ pub struct AuthoritySet<H, N> {
/// is lower than the last finalized block (as signaled in the forced
/// change) must be applied beforehand.
pending_forced_changes: Vec<PendingChange<H, N>>,
/// Track at which blocks the set id changed. This is useful when we need to prove finality for a
/// given block since we can figure out what set the block belongs to and when the set
/// Track at which blocks the set id changed. This is useful when we need to prove finality for
/// a given block since we can figure out what set the block belongs to and when the set
/// started/ended.
authority_set_changes: AuthoritySetChanges<N>,
}
@@ -657,16 +657,16 @@ impl<H, N: Add<Output = N> + Clone> PendingChange<H, N> {
pub struct AuthoritySetChanges<N>(Vec<(u64, N)>);
/// The response when querying for a set id for a specific block. Either we get a set id
/// together with a block number for the last block in the set, or that the requested block is in the
/// latest set, or that we don't know what set id the given block belongs to.
/// together with a block number for the last block in the set, or that the requested block is in
/// the latest set, or that we don't know what set id the given block belongs to.
#[derive(Debug, PartialEq)]
pub enum AuthoritySetChangeId<N> {
/// The requested block is in the latest set.
Latest,
/// Tuple containing the set id and the last block number of that set.
Set(SetId, N),
/// We don't know which set id the request block belongs to (this can only happen due to missing
/// data).
/// We don't know which set id the request block belongs to (this can only happen due to
/// missing data).
Unknown,
}
@@ -912,7 +912,8 @@ mod tests {
assert_eq!(authorities.pending_changes().collect::<Vec<_>>(), vec![&change_a, &change_b]);
// finalizing "hash_c" won't enact the change signaled at "hash_a" but it will prune out "hash_b"
// finalizing "hash_c" won't enact the change signaled at "hash_a" but it will prune out
// "hash_b"
let status = authorities
.apply_standard_changes(
"hash_c",