Use LOG_TARGET in consensus related crates (#12875)

* Use shared LOG_TARGET in consensus related crates
* Rename target from "afg" to "grandpa"
This commit is contained in:
Davide Galassi
2022-12-14 14:56:17 +01:00
committed by GitHub
parent 3e0a1904b7
commit 391adaf443
31 changed files with 343 additions and 247 deletions
@@ -52,7 +52,7 @@ use crate::{
authorities::{AuthoritySetChangeId, AuthoritySetChanges},
best_justification,
justification::GrandpaJustification,
SharedAuthoritySet,
SharedAuthoritySet, LOG_TARGET,
};
const MAX_UNKNOWN_HEADERS: usize = 100_000;
@@ -163,7 +163,7 @@ where
"Requested finality proof for descendant of #{} while we only have finalized #{}.",
block, info.finalized_number,
);
trace!(target: "afg", "{}", &err);
trace!(target: LOG_TARGET, "{}", &err);
return Err(FinalityProofError::BlockNotYetFinalized)
}
@@ -175,7 +175,7 @@ where
justification
} else {
trace!(
target: "afg",
target: LOG_TARGET,
"No justification found for the latest finalized block. \
Returning empty proof.",
);
@@ -194,7 +194,7 @@ where
grandpa_justification
} else {
trace!(
target: "afg",
target: LOG_TARGET,
"No justification found when making finality proof for {}. \
Returning empty proof.",
block,
@@ -205,7 +205,7 @@ where
},
AuthoritySetChangeId::Unknown => {
warn!(
target: "afg",
target: LOG_TARGET,
"AuthoritySetChanges does not cover the requested block #{} due to missing data. \
You need to resync to populate AuthoritySetChanges properly.",
block,