mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 01:38:04 +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:
@@ -48,7 +48,7 @@ use sp_staking::{
|
||||
};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
use crate::{Call, Config, Pallet};
|
||||
use crate::{Call, Config, Pallet, LOG_TARGET};
|
||||
|
||||
/// A trait with utility methods for handling equivocation reports in BABE.
|
||||
/// The trait provides methods for reporting an offence triggered by a valid
|
||||
@@ -161,15 +161,9 @@ where
|
||||
};
|
||||
|
||||
match SubmitTransaction::<T, Call<T>>::submit_unsigned_transaction(call.into()) {
|
||||
Ok(()) => log::info!(
|
||||
target: "runtime::babe",
|
||||
"Submitted BABE equivocation report.",
|
||||
),
|
||||
Err(e) => log::error!(
|
||||
target: "runtime::babe",
|
||||
"Error submitting equivocation report: {:?}",
|
||||
e,
|
||||
),
|
||||
Ok(()) => log::info!(target: LOG_TARGET, "Submitted BABE equivocation report.",),
|
||||
Err(e) =>
|
||||
log::error!(target: LOG_TARGET, "Error submitting equivocation report: {:?}", e,),
|
||||
}
|
||||
|
||||
Ok(())
|
||||
@@ -192,7 +186,7 @@ impl<T: Config> Pallet<T> {
|
||||
TransactionSource::Local | TransactionSource::InBlock => { /* allowed */ },
|
||||
_ => {
|
||||
log::warn!(
|
||||
target: "runtime::babe",
|
||||
target: LOG_TARGET,
|
||||
"rejecting unsigned report equivocation transaction because it is not local/in-block.",
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user