From b8261a4f1ca92225e23fdd1eb0ce7e98c718eb08 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Mon, 21 Mar 2022 12:43:38 +0100 Subject: [PATCH] Remove not required DigestItem conversion --- frame/aura/src/lib.rs | 4 ++-- frame/babe/src/lib.rs | 2 +- frame/grandpa/src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frame/aura/src/lib.rs b/frame/aura/src/lib.rs index 657965c60a3f1..0f474770017d5 100644 --- a/frame/aura/src/lib.rs +++ b/frame/aura/src/lib.rs @@ -153,7 +153,7 @@ impl Pallet { AURA_ENGINE_ID, ConsensusLog::AuthoritiesChange(new.into_inner()).encode(), ); - >::deposit_log(log.into()); + >::deposit_log(log); } fn initialize_authorities(authorities: &[T::AuthorityId]) { @@ -225,7 +225,7 @@ impl OneSessionHandler for Pallet { ConsensusLog::::OnDisabled(i as AuthorityIndex).encode(), ); - >::deposit_log(log.into()); + >::deposit_log(log); } } diff --git a/frame/babe/src/lib.rs b/frame/babe/src/lib.rs index f673c8b43bee0..87ae762707ccd 100644 --- a/frame/babe/src/lib.rs +++ b/frame/babe/src/lib.rs @@ -627,7 +627,7 @@ impl Pallet { fn deposit_consensus(new: U) { let log = DigestItem::Consensus(BABE_ENGINE_ID, new.encode()); - >::deposit_log(log.into()) + >::deposit_log(log) } fn deposit_randomness(randomness: &schnorrkel::Randomness) { diff --git a/frame/grandpa/src/lib.rs b/frame/grandpa/src/lib.rs index 68d4cf26a2e23..e30d65acbc6a6 100644 --- a/frame/grandpa/src/lib.rs +++ b/frame/grandpa/src/lib.rs @@ -498,7 +498,7 @@ impl Pallet { /// Deposit one of this module's logs. fn deposit_log(log: ConsensusLog) { let log = DigestItem::Consensus(GRANDPA_ENGINE_ID, log.encode()); - >::deposit_log(log.into()); + >::deposit_log(log); } // Perform module initialization, abstracted so that it can be called either through genesis