grandpa: fix broken line breaks in logging (#9179)

This commit is contained in:
André Silva
2021-06-23 08:50:48 +01:00
committed by GitHub
parent 4069877c1c
commit e35261c605
3 changed files with 10 additions and 12 deletions
@@ -295,8 +295,7 @@ where
debug!( debug!(
target: "afg", target: "afg",
"Inserting potential standard set change signaled at block {:?} (delayed by {:?} "Inserting potential standard set change signaled at block {:?} (delayed by {:?} blocks).",
blocks).",
(&number, &hash), (&number, &hash),
pending.delay, pending.delay,
); );
@@ -310,8 +309,8 @@ where
debug!( debug!(
target: "afg", target: "afg",
"There are now {} alternatives for the next pending standard change (roots), and a "There are now {} alternatives for the next pending standard change (roots), and a \
total of {} pending standard changes (across all forks).", total of {} pending standard changes (across all forks).",
self.pending_standard_changes.roots().count(), self.pending_standard_changes.roots().count(),
self.pending_standard_changes.iter().count(), self.pending_standard_changes.iter().count(),
); );
@@ -372,9 +372,8 @@ where
self.inner.header(BlockId::Number(canon_number)) self.inner.header(BlockId::Number(canon_number))
.map_err(|e| ConsensusError::ClientImport(e.to_string()))? .map_err(|e| ConsensusError::ClientImport(e.to_string()))?
.expect( .expect(
"the given block number is less or equal than the current best "the given block number is less or equal than the current best finalized number; \
finalized number; current best finalized number must exist in current best finalized number must exist in chain; qed."
chain; qed."
) )
.hash(); .hash();
+5 -5
View File
@@ -778,7 +778,7 @@ where
let authorities = serde_json::to_string(&authorities).expect( let authorities = serde_json::to_string(&authorities).expect(
"authorities is always at least an empty vector; \ "authorities is always at least an empty vector; \
elements are always of type string", elements are always of type string",
); );
telemetry!( telemetry!(
@@ -945,7 +945,7 @@ where
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let authorities = serde_json::to_string(&authorities).expect( 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!( telemetry!(
@@ -1037,9 +1037,9 @@ where
let voters = Arc::new(VoterSet::new(new.authorities.into_iter()) let voters = Arc::new(VoterSet::new(new.authorities.into_iter())
.expect( .expect(
"new authorities come from pending change; \ "new authorities come from pending change; \
pending change comes from `AuthoritySet`; \ pending change comes from `AuthoritySet`; \
`AuthoritySet` validates authorities is non-empty and weights are non-zero; \ `AuthoritySet` validates authorities is non-empty and weights are non-zero; \
qed." qed."
) )
); );