derive Serialize/Deserialize for BeefyAuthoritySet (#12516)

This commit is contained in:
Serban Iorga
2022-10-18 13:15:40 +03:00
committed by GitHub
parent 738dc8460e
commit 2f341fcf15
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -535,6 +535,7 @@ dependencies = [
"array-bytes",
"parity-scale-codec",
"scale-info",
"serde",
"sp-api",
"sp-application-crypto",
"sp-core",
+2
View File
@@ -14,6 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.136", optional = true, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
sp-api = { version = "4.0.0-dev", default-features = false, path = "../api" }
sp-application-crypto = { version = "6.0.0", default-features = false, path = "../application-crypto" }
@@ -32,6 +33,7 @@ default = ["std"]
std = [
"codec/std",
"scale-info/std",
"serde",
"sp-api/std",
"sp-application-crypto/std",
"sp-core/std",
+1
View File
@@ -101,6 +101,7 @@ impl MmrLeafVersion {
/// Details of a BEEFY authority set.
#[derive(Debug, Default, PartialEq, Eq, Clone, Encode, Decode, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
pub struct BeefyAuthoritySet<MerkleRoot> {
/// Id of the set.
///