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
@@ -20,6 +20,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![warn(missing_docs)]
use scale_info::TypeInfo;
use sp_debug_derive::RuntimeDebug;
use sp_runtime::traits;
#[cfg(not(feature = "std"))]
@@ -69,7 +70,7 @@ impl<Hash> OnNewRoot<Hash> for () {
}
/// A MMR proof data for one of the leaves.
#[derive(codec::Encode, codec::Decode, RuntimeDebug, Clone, PartialEq, Eq)]
#[derive(codec::Encode, codec::Decode, RuntimeDebug, Clone, PartialEq, Eq, TypeInfo)]
pub struct Proof<Hash> {
/// The index of the leaf the proof is for.
pub leaf_index: LeafIndex,
@@ -352,7 +353,7 @@ impl_leaf_data_for_tuple!(A:0, B:1, C:2, D:3);
impl_leaf_data_for_tuple!(A:0, B:1, C:2, D:3, E:4);
/// A MMR proof data for a group of leaves.
#[derive(codec::Encode, codec::Decode, RuntimeDebug, Clone, PartialEq, Eq)]
#[derive(codec::Encode, codec::Decode, RuntimeDebug, Clone, PartialEq, Eq, TypeInfo)]
pub struct BatchProof<Hash> {
/// The indices of the leaves the proof is for.
pub leaf_indices: Vec<LeafIndex>,