Skip to content

Commit abb217d

Browse files
authored
GrandpaJustification: Feature gate Debug (paritytech#12664)
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`.
1 parent 2badd72 commit abb217d

File tree

1 file changed

+2
-1
lines changed
  • primitives/finality-grandpa/src

1 file changed

+2
-1
lines changed

primitives/finality-grandpa/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ pub type CompactCommit<Header> = grandpa::CompactCommit<
129129
///
130130
/// This is meant to be stored in the db and passed around the network to other
131131
/// nodes, and are used by syncing nodes to prove authority set handoffs.
132-
#[derive(Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug)]
132+
#[derive(Clone, Encode, Decode, PartialEq, Eq)]
133+
#[cfg_attr(feature = "std", derive(Debug))]
133134
pub struct GrandpaJustification<Header: HeaderT> {
134135
pub round: u64,
135136
pub commit: Commit<Header>,

0 commit comments

Comments
 (0)