Eliminate experimental feature (#3654)

Totally removes the `experimental` feature. Closes #3648.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
s0me0ne-unkn0wn
2024-03-17 21:02:11 +01:00
committed by GitHub
parent d2a7100e3b
commit 1f9505c0d3
41 changed files with 15 additions and 120 deletions
+1 -18
View File
@@ -66,9 +66,6 @@ const LOG_TARGET: &str = "runtime::aura";
///
/// This was the default behavior of the Aura pallet and may be used for
/// backwards compatibility.
///
/// Note that this type is likely not useful without the `experimental`
/// feature.
pub struct MinimumPeriodTimesTwo<T>(sp_std::marker::PhantomData<T>);
impl<T: pallet_timestamp::Config> Get<T::Moment> for MinimumPeriodTimesTwo<T> {
@@ -117,10 +114,6 @@ pub mod pallet {
/// The effective value of this type should not change while the chain is running.
///
/// For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const.
///
/// This associated type is only present when compiled with the `experimental`
/// feature.
#[cfg(feature = "experimental")]
type SlotDuration: Get<<Self as pallet_timestamp::Config>::Moment>;
}
@@ -250,17 +243,7 @@ impl<T: Config> Pallet<T> {
/// Determine the Aura slot-duration based on the Timestamp module configuration.
pub fn slot_duration() -> T::Moment {
#[cfg(feature = "experimental")]
{
T::SlotDuration::get()
}
#[cfg(not(feature = "experimental"))]
{
// we double the minimum block-period so each author can always propose within
// the majority of its slot.
<T as pallet_timestamp::Config>::MinimumPeriod::get().saturating_mul(2u32.into())
}
T::SlotDuration::get()
}
/// Ensure the correctness of the state of this pallet.
-2
View File
@@ -84,8 +84,6 @@ impl pallet_aura::Config for Test {
type DisabledValidators = MockDisabledValidators;
type MaxAuthorities = ConstU32<10>;
type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot;
#[cfg(feature = "experimental")]
type SlotDuration = ConstU64<SLOT_DURATION>;
}