mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 15:41:02 +00:00
Companion PR for substrate PR 8072 - Add a config field to babe epochs (#2467)
* Add a config field to babe epochs * Fix test * Add BABE_GENESIS_EPOCH_CONFIG consts * Use PrimaryAndSecondaryVRFSlots and remove newlines * Make epoch_configs Some * Fix tests * Fix test service tests * Add a BabeEpochConfigMigrations OnRuntimeUpgrade * Apply suggestions * Use PrimaryAndSecondaryPlainSlots in kusama * Remove migration from test runtime and rococo * Add HasPalletPrefix * Rename to BabePalletPrefix and change BabeApi -> Babe * "Update Substrate" * Update substrate * Resolve parantheses errors Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -100,6 +100,13 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
transaction_version: 1,
|
||||
};
|
||||
|
||||
/// The BABE epoch configuration at genesis.
|
||||
pub const BABE_GENESIS_EPOCH_CONFIG: babe_primitives::BabeEpochConfiguration =
|
||||
babe_primitives::BabeEpochConfiguration {
|
||||
c: PRIMARY_PROBABILITY,
|
||||
allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryVRFSlots
|
||||
};
|
||||
|
||||
/// Native version.
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub fn native_version() -> NativeVersion {
|
||||
@@ -737,10 +744,10 @@ sp_api::impl_runtime_apis! {
|
||||
babe_primitives::BabeGenesisConfiguration {
|
||||
slot_duration: Babe::slot_duration(),
|
||||
epoch_length: EpochDuration::get(),
|
||||
c: PRIMARY_PROBABILITY,
|
||||
c: BABE_GENESIS_EPOCH_CONFIG.c,
|
||||
genesis_authorities: Babe::authorities(),
|
||||
randomness: Babe::randomness(),
|
||||
allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryVRFSlots,
|
||||
allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user