Skip to content

Commit

Permalink
GrandpaJustification: Feature gate Debug (paritytech#12664)
Browse files Browse the repository at this point in the history
The grandpa crate is deriving `Debug` only when the `std` feature is enabled. `RuntimeDebug` can be
forced to derive `Debug` also in `no_std` and that doesn't work together. So, we should feature gate
`Debug` on `no_std`.
  • Loading branch information
bkchr authored and ark0f committed Feb 27, 2023
1 parent 3a6ff0f commit 4c4da4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion primitives/finality-grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ pub type CompactCommit<Header> = grandpa::CompactCommit<
///
/// This is meant to be stored in the db and passed around the network to other
/// nodes, and are used by syncing nodes to prove authority set handoffs.
#[derive(Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug)]
#[derive(Clone, Encode, Decode, PartialEq, Eq)]
#[cfg_attr(feature = "std", derive(Debug))]
pub struct GrandpaJustification<Header: HeaderT> {
pub round: u64,
pub commit: Commit<Header>,
Expand Down

0 comments on commit 4c4da4b

Please sign in to comment.