Skip to content

Commit

Permalink
Nonzero minimum period (#57)
Browse files Browse the repository at this point in the history
* nonzero minimum period

* expose SlotDuration to fix MinimumPeriod

* fix imports
  • Loading branch information
4meta5 authored Dec 12, 2024
1 parent dc882d9 commit 29b72b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub mod system;
pub mod tanssi;
pub mod weights;
pub mod xcm;
use crate::weights::*;
pub use crate::weights::*;
use frame_support::traits::{ConstU32, Get, OnTimestampSet};
use sp_version::RuntimeVersion;

Expand All @@ -23,6 +23,7 @@ pub trait SystemConfig: SystemWeight {
type PreimageOrigin;
type ProxyType;
type ConsensusHook;
type SlotDuration;
type OnTimestampSet: OnTimestampSet<u64>;
type MaxConsumers = ConstU32<16>;
type MaxSignatories = ConstU32<100>;
Expand Down
2 changes: 1 addition & 1 deletion src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ macro_rules! impl_openzeppelin_system {
}

impl pallet_timestamp::Config for Runtime {
type MinimumPeriod = ConstU64<0>;
type MinimumPeriod = <$t as SystemConfig>::SlotDuration;
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = <$t as SystemConfig>::OnTimestampSet;
Expand Down

0 comments on commit 29b72b5

Please sign in to comment.