mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 09:51:10 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user