Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Added serde feature to sp-consensus-aura (#14166)
Browse files Browse the repository at this point in the history
This is followup of #13027.

`Aura` need to enable `serde` feature in dependent crates, otherwise
test-substrate-runtime compilation fails with the following error if
`serde` is enabled:

```
  error: cannot find macro `format` in this scope
    -->
/home/miszka/parity/10-genesis-config/substrate-master/primitives/consensus/aura/src/lib.rs:50:3
     |
  50 |         app_crypto!(ed25519, AURA);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: consider importing one of these items:
             scale_info::prelude::format
             sp_application_crypto::format
     = note: this error originates in the macro
`$crate::app_crypto_public_common_if_serde` which comes from the
expansion of the macro `app_crypto` (in Nightly builds, run with -Z
macro-backtrace for more info)
```
  • Loading branch information
michalkucharczyk authored May 18, 2023
1 parent f4a2e84 commit bc89da2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions primitives/consensus/aura/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,11 @@ std = [
"sp-std/std",
"sp-timestamp/std",
]

# Serde support without relying on std features.
serde = [
"scale-info/serde",
"sp-application-crypto/serde",
"sp-consensus-slots/serde",
"sp-runtime/serde",
]

0 comments on commit bc89da2

Please sign in to comment.