MMR: impl TypeInfo for some structures (#12423)

* BEEFY client: avoid unnecessary clone

* MMR: impl TypeInfo for some structures
This commit is contained in:
Serban Iorga
2022-10-05 17:11:50 +03:00
committed by GitHub
parent b135a0fae4
commit 6f9ae78d30
6 changed files with 9 additions and 6 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ impl BeefyDataProvider<Vec<u8>> for () {
}
/// A standard leaf that gets added every block to the MMR constructed by Substrate's `pallet_mmr`.
#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)]
#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, TypeInfo)]
pub struct MmrLeaf<BlockNumber, Hash, MerkleRoot, ExtraData> {
/// Version of the leaf format.
///
@@ -73,7 +73,7 @@ pub struct MmrLeaf<BlockNumber, Hash, MerkleRoot, ExtraData> {
/// Given that adding new struct elements in SCALE is backward compatible (i.e. old format can be
/// still decoded, the new fields will simply be ignored). We expect the major version to be bumped
/// very rarely (hopefuly never).
#[derive(Debug, Default, PartialEq, Eq, Clone, Encode, Decode)]
#[derive(Debug, Default, PartialEq, Eq, Clone, Encode, Decode, TypeInfo)]
pub struct MmrLeafVersion(u8);
impl MmrLeafVersion {
/// Create new version object from `major` and `minor` components.