mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 07:31:08 +00:00
Generate storage info for pallet babe (#9760)
* Adding MaxEncodedLen for: * NextConfigDescriptor * AllowedSlots * BabeEpochConfiguration In prepation for adding storage information on pallet babe * Adding stotage_info to pallet babe Refactored UNDER_CONSTRUCTION_SEGMENT_LENGTH to become a runtime parameter MaxSegmentLength * Reinstate Slice as opposed to Vec * Refactoring code to make it neater * Replace `MaxSegmentLength` by `UNDER_CONSTRUCTION_SEGMENT_LENGTH` Stop exposing the bounds to the runtime * Removing extra line Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ use super::{
|
||||
AllowedSlots, AuthorityId, AuthorityIndex, AuthoritySignature, BabeAuthorityWeight,
|
||||
BabeEpochConfiguration, Slot, BABE_ENGINE_ID,
|
||||
};
|
||||
use codec::{Codec, Decode, Encode};
|
||||
use codec::{Codec, Decode, Encode, MaxEncodedLen};
|
||||
use sp_runtime::{DigestItem, RuntimeDebug};
|
||||
use sp_std::vec::Vec;
|
||||
|
||||
@@ -134,7 +134,9 @@ pub struct NextEpochDescriptor {
|
||||
|
||||
/// Information about the next epoch config, if changed. This is broadcast in the first
|
||||
/// block of the epoch, and applies using the same rules as `NextEpochDescriptor`.
|
||||
#[derive(Decode, Encode, PartialEq, Eq, Clone, RuntimeDebug, scale_info::TypeInfo)]
|
||||
#[derive(
|
||||
Decode, Encode, PartialEq, Eq, Clone, RuntimeDebug, MaxEncodedLen, scale_info::TypeInfo,
|
||||
)]
|
||||
pub enum NextConfigDescriptor {
|
||||
/// Version 1.
|
||||
#[codec(index = 1)]
|
||||
|
||||
Reference in New Issue
Block a user