diff --git a/bridges/primitives/header-chain/src/justification.rs b/bridges/primitives/header-chain/src/justification.rs index 8433107fce20d..a8f5148253129 100644 --- a/bridges/primitives/header-chain/src/justification.rs +++ b/bridges/primitives/header-chain/src/justification.rs @@ -24,7 +24,7 @@ use crate::ChainWithGrandpa; use bp_runtime::{BlockNumberOf, Chain, HashOf}; use codec::{Decode, Encode, MaxEncodedLen}; use finality_grandpa::voter_set::VoterSet; -use frame_support::RuntimeDebug; +use frame_support::{RuntimeDebug, RuntimeDebugNoBound}; use scale_info::TypeInfo; use sp_consensus_grandpa::{AuthorityId, AuthoritySignature, SetId}; use sp_runtime::{traits::Header as HeaderT, SaturatedConversion}; @@ -38,7 +38,7 @@ use sp_std::{ /// /// This particular proof is used to prove that headers on a bridged chain /// (so not our chain) have been finalized correctly. -#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebugNoBound)] pub struct GrandpaJustification { /// The round (voting period) this justification is valid for. pub round: u64, @@ -49,25 +49,6 @@ pub struct GrandpaJustification { pub votes_ancestries: Vec
, } -// TODO: remove and use `RuntimeDebug` (https://github.com/paritytech/parity-bridges-common/issues/2136) -impl sp_std::fmt::Debug for GrandpaJustification
{ - fn fmt(&self, fmt: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { - #[cfg(feature = "std")] - { - fmt.debug_struct("GrandpaJustification") - .field("round", &self.round) - .field("commit", &self.commit) - .field("votes_ancestries", &self.votes_ancestries) - .finish() - } - - #[cfg(not(feature = "std"))] - { - fmt.write_str("") - } - } -} - impl GrandpaJustification { /// Returns reasonable size of justification using constants from the provided chain. ///