mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 19:05:41 +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:
@@ -15,6 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::LOG_TARGET;
|
||||
use frame_support::{
|
||||
traits::{Get, StorageVersion},
|
||||
weights::Weight,
|
||||
@@ -34,14 +35,14 @@ pub const OLD_PREFIX: &[u8] = b"GrandpaFinality";
|
||||
pub fn migrate<T: crate::Config, N: AsRef<str>>(new_pallet_name: N) -> Weight {
|
||||
if new_pallet_name.as_ref().as_bytes() == OLD_PREFIX {
|
||||
log::info!(
|
||||
target: "runtime::afg",
|
||||
target: LOG_TARGET,
|
||||
"New pallet name is equal to the old prefix. No migration needs to be done.",
|
||||
);
|
||||
return Weight::zero()
|
||||
}
|
||||
let storage_version = StorageVersion::get::<crate::Pallet<T>>();
|
||||
log::info!(
|
||||
target: "runtime::afg",
|
||||
target: LOG_TARGET,
|
||||
"Running migration to v3.1 for grandpa with storage version {:?}",
|
||||
storage_version,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user