Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
grandpa: fix broken line breaks in logging (#9179)
Browse files Browse the repository at this point in the history
  • Loading branch information
andresilva authored Jun 23, 2021
1 parent 63c4b49 commit 54813c8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
7 changes: 3 additions & 4 deletions client/finality-grandpa/src/authorities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ where

debug!(
target: "afg",
"Inserting potential standard set change signaled at block {:?} (delayed by {:?}
blocks).",
"Inserting potential standard set change signaled at block {:?} (delayed by {:?} blocks).",
(&number, &hash),
pending.delay,
);
Expand All @@ -310,8 +309,8 @@ where

debug!(
target: "afg",
"There are now {} alternatives for the next pending standard change (roots), and a
total of {} pending standard changes (across all forks).",
"There are now {} alternatives for the next pending standard change (roots), and a \
total of {} pending standard changes (across all forks).",
self.pending_standard_changes.roots().count(),
self.pending_standard_changes.iter().count(),
);
Expand Down
5 changes: 2 additions & 3 deletions client/finality-grandpa/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,8 @@ where
self.inner.header(BlockId::Number(canon_number))
.map_err(|e| ConsensusError::ClientImport(e.to_string()))?
.expect(
"the given block number is less or equal than the current best
finalized number; current best finalized number must exist in
chain; qed."
"the given block number is less or equal than the current best finalized number; \
current best finalized number must exist in chain; qed."
)
.hash();

Expand Down
10 changes: 5 additions & 5 deletions client/finality-grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ where

let authorities = serde_json::to_string(&authorities).expect(
"authorities is always at least an empty vector; \
elements are always of type string",
elements are always of type string",
);

telemetry!(
Expand Down Expand Up @@ -945,7 +945,7 @@ where
.collect::<Vec<_>>();

let authorities = serde_json::to_string(&authorities).expect(
"authorities is always at least an empty vector; elements are always of type string",
"authorities is always at least an empty vector; elements are always of type string; qed.",
);

telemetry!(
Expand Down Expand Up @@ -1037,9 +1037,9 @@ where
let voters = Arc::new(VoterSet::new(new.authorities.into_iter())
.expect(
"new authorities come from pending change; \
pending change comes from `AuthoritySet`; \
`AuthoritySet` validates authorities is non-empty and weights are non-zero; \
qed."
pending change comes from `AuthoritySet`; \
`AuthoritySet` validates authorities is non-empty and weights are non-zero; \
qed."
)
);

Expand Down

0 comments on commit 54813c8

Please sign in to comment.