Companion for Generate storage info for pallet babe #9760 (#3831)

* Adding MaxSegmentLength and MaxAuthorities
to pallet babe

* Missed a few to_vec

* Removing `MaxSegmentLength` as not needed anymore

* Adding `MaxAuthorities` to couple of missing place

* Adding missing definition of `MaxAuthorities`

* Adding a missing to_vec

* update Substrate

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: parity-processbot <>
This commit is contained in:
Georges
2021-09-23 00:33:44 +01:00
committed by GitHub
parent 8c68412958
commit 24a141b5a3
7 changed files with 170 additions and 159 deletions
+154 -154
View File
File diff suppressed because it is too large Load Diff
@@ -108,6 +108,7 @@ parameter_types! {
pub const EpochDuration: u64 = 10;
pub const ExpectedBlockTime: Moment = 6_000;
pub const ReportLongevity: u64 = 10;
pub const MaxAuthorities: u32 = 100_000;
}
impl pallet_babe::Config for Test {
@@ -126,6 +127,7 @@ impl pallet_babe::Config for Test {
)>>::IdentificationTuple;
type HandleEquivocation = ();
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
+3 -1
View File
@@ -240,6 +240,8 @@ impl pallet_babe::Config for Runtime {
pallet_babe::EquivocationHandler<Self::KeyOwnerIdentification, Offences, ReportLongevity>;
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
@@ -1938,7 +1940,7 @@ sp_api::impl_runtime_apis! {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: BABE_GENESIS_EPOCH_CONFIG.c,
genesis_authorities: Babe::authorities(),
genesis_authorities: Babe::authorities().to_vec(),
randomness: Babe::randomness(),
allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots,
}
+3 -1
View File
@@ -245,6 +245,8 @@ impl pallet_babe::Config for Runtime {
pallet_babe::EquivocationHandler<Self::KeyOwnerIdentification, Offences, ReportLongevity>;
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
@@ -1514,7 +1516,7 @@ sp_api::impl_runtime_apis! {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: BABE_GENESIS_EPOCH_CONFIG.c,
genesis_authorities: Babe::authorities(),
genesis_authorities: Babe::authorities().to_vec(),
randomness: Babe::randomness(),
allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots,
}
+3 -1
View File
@@ -512,6 +512,8 @@ impl pallet_babe::Config for Runtime {
pallet_babe::EquivocationHandler<Self::KeyOwnerIdentification, Offences, ReportLongevity>;
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
@@ -1309,7 +1311,7 @@ sp_api::impl_runtime_apis! {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDurationInBlocks::get().into(),
c: BABE_GENESIS_EPOCH_CONFIG.c,
genesis_authorities: Babe::authorities(),
genesis_authorities: Babe::authorities().to_vec(),
randomness: Babe::randomness(),
allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots,
}
+2 -1
View File
@@ -188,6 +188,7 @@ impl pallet_babe::Config for Runtime {
type HandleEquivocation = ();
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
@@ -914,7 +915,7 @@ sp_api::impl_runtime_apis! {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: BABE_GENESIS_EPOCH_CONFIG.c,
genesis_authorities: Babe::authorities(),
genesis_authorities: Babe::authorities().to_vec(),
randomness: Babe::randomness(),
allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots,
}
+3 -1
View File
@@ -226,6 +226,8 @@ impl pallet_babe::Config for Runtime {
pallet_babe::EquivocationHandler<Self::KeyOwnerIdentification, Offences, ReportLongevity>;
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
}
parameter_types! {
@@ -1363,7 +1365,7 @@ sp_api::impl_runtime_apis! {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: BABE_GENESIS_EPOCH_CONFIG.c,
genesis_authorities: Babe::authorities(),
genesis_authorities: Babe::authorities().to_vec(),
randomness: Babe::randomness(),
allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots,
}