1616// limitations under the License.
1717
1818use codec:: { Decode , Encode , Error , Input } ;
19+ use scale_info:: TypeInfo ;
1920use sp_std:: { cmp, prelude:: * } ;
2021
2122use crate :: ValidatorSetId ;
@@ -39,7 +40,7 @@ pub mod known_payload_ids {
3940/// Identifiers MUST be sorted by the [`BeefyPayloadId`] to allow efficient lookup of expected
4041/// value. Duplicated identifiers are disallowed. It's okay for different implementations to only
4142/// support a subset of possible values.
42- #[ derive( Decode , Encode , Debug , PartialEq , Eq , Clone , Ord , PartialOrd , Hash ) ]
43+ #[ derive( Decode , Encode , Debug , PartialEq , Eq , Clone , Ord , PartialOrd , Hash , TypeInfo ) ]
4344pub struct Payload ( Vec < ( BeefyPayloadId , Vec < u8 > ) > ) ;
4445
4546impl Payload {
@@ -80,7 +81,7 @@ impl Payload {
8081/// height [block_number](Commitment::block_number).
8182/// GRANDPA validators collect signatures on commitments and a stream of such signed commitments
8283/// (see [SignedCommitment]) forms the BEEFY protocol.
83- #[ derive( Clone , Debug , PartialEq , Eq , Encode , Decode ) ]
84+ #[ derive( Clone , Debug , PartialEq , Eq , Encode , Decode , TypeInfo ) ]
8485pub struct Commitment < TBlockNumber > {
8586 /// A collection of payloads to be signed, see [`Payload`] for details.
8687 ///
@@ -138,7 +139,7 @@ where
138139/// Note that SCALE-encoding of the structure is optimized for size efficiency over the wire,
139140/// please take a look at custom [`Encode`] and [`Decode`] implementations and
140141/// `CompactSignedCommitment` struct.
141- #[ derive( Clone , Debug , PartialEq , Eq ) ]
142+ #[ derive( Clone , Debug , PartialEq , Eq , TypeInfo ) ]
142143pub struct SignedCommitment < TBlockNumber , TSignature > {
143144 /// The commitment signatures are collected for.
144145 pub commitment : Commitment < TBlockNumber > ,
0 commit comments