mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
Fix slot_duration divide by zero panic in rococo-parachain runtime (#2612)
Adds the fix in https://github.com/paritytech/polkadot-sdk/pull/2039 to the rococo-parachain runtime.
This commit is contained in:
@@ -229,6 +229,9 @@ impl pallet_timestamp::Config for Runtime {
|
||||
/// A timestamp: milliseconds since the unix epoch.
|
||||
type Moment = u64;
|
||||
type OnTimestampSet = Aura;
|
||||
#[cfg(feature = "experimental")]
|
||||
type MinimumPeriod = ConstU64<0>;
|
||||
#[cfg(not(feature = "experimental"))]
|
||||
type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
@@ -757,7 +760,7 @@ impl_runtime_apis! {
|
||||
|
||||
impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
|
||||
fn slot_duration() -> sp_consensus_aura::SlotDuration {
|
||||
sp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION)
|
||||
sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())
|
||||
}
|
||||
|
||||
fn authorities() -> Vec<AuraId> {
|
||||
|
||||
Reference in New Issue
Block a user