Unverified Commit 9e43470f authored by Georges's avatar Georges Committed by GitHub
Browse files

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's avatarthiolliere <gui.thiolliere@gmail.com>
Co-authored-by: parity-processbot <>
parent a19b9ef8
Pipeline #158706 passed with stages
in 45 minutes and 26 seconds
This diff is collapsed.
......@@ -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! {
......
......@@ -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,
}
......
......@@ -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,
}
......
......@@ -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,
}
......
......@@ -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,
}
......
......@@ -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,
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment