mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 05:51:02 +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:
@@ -28,7 +28,7 @@ pub use sp_consensus_vrf::schnorrkel::{
|
||||
Randomness, RANDOMNESS_LENGTH, VRF_OUTPUT_LENGTH, VRF_PROOF_LENGTH,
|
||||
};
|
||||
|
||||
use codec::{Decode, Encode};
|
||||
use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use scale_info::TypeInfo;
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -214,7 +214,7 @@ pub struct BabeGenesisConfiguration {
|
||||
}
|
||||
|
||||
/// Types of allowed slots.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, RuntimeDebug, MaxEncodedLen, TypeInfo)]
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
pub enum AllowedSlots {
|
||||
/// Only allow primary slots.
|
||||
@@ -247,7 +247,7 @@ impl sp_consensus::SlotData for BabeGenesisConfiguration {
|
||||
}
|
||||
|
||||
/// Configuration data used by the BABE consensus engine.
|
||||
#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)]
|
||||
#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, MaxEncodedLen, TypeInfo)]
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
pub struct BabeEpochConfiguration {
|
||||
/// A constant value that is used in the threshold calculation formula.
|
||||
|
||||
Reference in New Issue
Block a user