From e35261c605b23d437afe7e4bdf2b716de07ce373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= <123550+andresilva@users.noreply.github.com> Date: Wed, 23 Jun 2021 08:50:48 +0100 Subject: [PATCH] grandpa: fix broken line breaks in logging (#9179) --- substrate/client/finality-grandpa/src/authorities.rs | 7 +++---- substrate/client/finality-grandpa/src/import.rs | 5 ++--- substrate/client/finality-grandpa/src/lib.rs | 10 +++++----- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/substrate/client/finality-grandpa/src/authorities.rs b/substrate/client/finality-grandpa/src/authorities.rs index ececbf1d7c7..a04be72f9d3 100644 --- a/substrate/client/finality-grandpa/src/authorities.rs +++ b/substrate/client/finality-grandpa/src/authorities.rs @@ -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, ); @@ -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(), ); diff --git a/substrate/client/finality-grandpa/src/import.rs b/substrate/client/finality-grandpa/src/import.rs index c287cc0b3b8..ebb26a28c34 100644 --- a/substrate/client/finality-grandpa/src/import.rs +++ b/substrate/client/finality-grandpa/src/import.rs @@ -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(); diff --git a/substrate/client/finality-grandpa/src/lib.rs b/substrate/client/finality-grandpa/src/lib.rs index a133319fdbe..6c3f0f6af37 100644 --- a/substrate/client/finality-grandpa/src/lib.rs +++ b/substrate/client/finality-grandpa/src/lib.rs @@ -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!( @@ -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!( @@ -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." ) ); -- GitLab