cumulus: fix test runtimes panic (#2039)

the min slot duration should be 0 only if the `experimental` feature is
enabled. otherwise, the runtime will panic on a division by 0.
This commit is contained in:
Alin Dima
2023-10-26 22:00:51 +03:00
committed by GitHub
parent 21d36b7b42
commit 1b08bdd2dd
5 changed files with 16 additions and 5 deletions
@@ -219,7 +219,10 @@ impl pallet_aura::Config for Runtime {
impl pallet_timestamp::Config for Runtime {
type Moment = u64;
type OnTimestampSet = Aura;
#[cfg(feature = "experimental")]
type MinimumPeriod = ConstU64<0>;
#[cfg(not(feature = "experimental"))]
type MinimumPeriod = ConstU64<{ parachains_common::SLOT_DURATION / 2 }>;
type WeightInfo = ();
}