mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 22:41:02 +00:00
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:
@@ -45,6 +45,7 @@ use crate::{
|
||||
justification::GrandpaJustification,
|
||||
notification::GrandpaJustificationSender,
|
||||
AuthoritySetChanges, ClientForGrandpa, CommandOrError, Error, NewAuthoritySet, VoterCommand,
|
||||
LOG_TARGET,
|
||||
};
|
||||
|
||||
/// A block-import handler for GRANDPA.
|
||||
@@ -589,18 +590,16 @@ where
|
||||
Ok(ImportResult::Imported(aux)) => aux,
|
||||
Ok(r) => {
|
||||
debug!(
|
||||
target: "afg",
|
||||
"Restoring old authority set after block import result: {:?}",
|
||||
r,
|
||||
target: LOG_TARGET,
|
||||
"Restoring old authority set after block import result: {:?}", r,
|
||||
);
|
||||
pending_changes.revert();
|
||||
return Ok(r)
|
||||
},
|
||||
Err(e) => {
|
||||
debug!(
|
||||
target: "afg",
|
||||
"Restoring old authority set after block import error: {}",
|
||||
e,
|
||||
target: LOG_TARGET,
|
||||
"Restoring old authority set after block import error: {}", e,
|
||||
);
|
||||
pending_changes.revert();
|
||||
return Err(ConsensusError::ClientImport(e.to_string()))
|
||||
@@ -665,7 +664,7 @@ where
|
||||
import_res.unwrap_or_else(|err| {
|
||||
if needs_justification {
|
||||
debug!(
|
||||
target: "afg",
|
||||
target: LOG_TARGET,
|
||||
"Requesting justification from peers due to imported block #{} that enacts authority set change with invalid justification: {}",
|
||||
number,
|
||||
err
|
||||
@@ -678,7 +677,7 @@ where
|
||||
None =>
|
||||
if needs_justification {
|
||||
debug!(
|
||||
target: "afg",
|
||||
target: LOG_TARGET,
|
||||
"Imported unjustified block #{} that enacts authority set change, waiting for finality for enactment.",
|
||||
number,
|
||||
);
|
||||
@@ -803,7 +802,7 @@ where
|
||||
|
||||
match result {
|
||||
Err(CommandOrError::VoterCommand(command)) => {
|
||||
afg_log!(
|
||||
grandpa_log!(
|
||||
initial_sync,
|
||||
"👴 Imported justification for block #{} that triggers \
|
||||
command {}, signaling voter.",
|
||||
|
||||
Reference in New Issue
Block a user