mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
Serialize/Deserialize trait implemented in no-std for numerous types (#7312)
* ParaId: Serialize/Deserialize trait implemented in no-std
* Serialize/Deserialize trait implemented in no-std for more types
* serde in deps enabled
* fix
* missing types added
* update lockfile for {"substrate"}
* ".git/.scripts/commands/fmt/fmt.sh"
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
306270b889
commit
a767358122
@@ -44,8 +44,16 @@ pub use pallet::*;
|
||||
const LOG_TARGET: &str = "runtime::configuration";
|
||||
|
||||
/// All configuration of the runtime with respect to parachains and parathreads.
|
||||
#[derive(Clone, Encode, Decode, PartialEq, sp_core::RuntimeDebug, scale_info::TypeInfo)]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[derive(
|
||||
Clone,
|
||||
Encode,
|
||||
Decode,
|
||||
PartialEq,
|
||||
sp_core::RuntimeDebug,
|
||||
scale_info::TypeInfo,
|
||||
serde::Serialize,
|
||||
serde::Deserialize,
|
||||
)]
|
||||
pub struct HostConfiguration<BlockNumber> {
|
||||
// NOTE: This structure is used by parachains via merkle proofs. Therefore, this struct requires
|
||||
// special treatment.
|
||||
|
||||
@@ -129,7 +129,6 @@ use sp_runtime::{
|
||||
};
|
||||
use sp_std::{cmp, collections::btree_set::BTreeSet, mem, prelude::*};
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub use crate::Origin as ParachainOrigin;
|
||||
@@ -290,15 +289,14 @@ impl<N: Ord + Copy + PartialEq> ParaPastCodeMeta<N> {
|
||||
}
|
||||
|
||||
/// Arguments for initializing a para.
|
||||
#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, Serialize, Deserialize)]
|
||||
pub struct ParaGenesisArgs {
|
||||
/// The initial head data to use.
|
||||
pub genesis_head: HeadData,
|
||||
/// The initial validation code to use.
|
||||
pub validation_code: ValidationCode,
|
||||
/// Parachain or Parathread.
|
||||
#[cfg_attr(feature = "std", serde(rename = "parachain"))]
|
||||
#[serde(rename = "parachain")]
|
||||
pub para_kind: ParaKind,
|
||||
}
|
||||
|
||||
@@ -309,7 +307,6 @@ pub enum ParaKind {
|
||||
Parachain,
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl Serialize for ParaKind {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
@@ -322,7 +319,6 @@ impl Serialize for ParaKind {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl<'de> Deserialize<'de> for ParaKind {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user