1234567891011121314151617use frame_support::{parameter_types, weights::Weight};18use up_common::constants::*;1920use crate::{DmpQueue, Runtime, RuntimeEvent, XcmpQueue};2122parameter_types! {23 pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);24 pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);25}2627impl cumulus_pallet_parachain_system::Config for Runtime {28 type RuntimeEvent = RuntimeEvent;29 type SelfParaId = parachain_info::Pallet<Self>;30 type OnSystemEvent = ();31 32 33 34 35 36 type OutboundXcmpMessageSource = XcmpQueue;37 type DmpMessageHandler = DmpQueue;38 type ReservedDmpWeight = ReservedDmpWeight;39 type ReservedXcmpWeight = ReservedXcmpWeight;40 type XcmpMessageHandler = XcmpQueue;41 #[cfg(not(feature = "lookahead"))]42 type CheckAssociatedRelayNumber = cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;43 #[cfg(feature = "lookahead")]44 type CheckAssociatedRelayNumber =45 cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases;46}4748impl parachain_info::Config for Runtime {}4950impl cumulus_pallet_aura_ext::Config for Runtime {}51525354#[cfg(feature = "lookahead")]55const UNINCLUDED_SEGMENT_CAPACITY: u32 = 3;565758#[cfg(feature = "lookahead")]59const BLOCK_PROCESSING_VELOCITY: u32 = 2;60#[cfg(feature = "lookahead")]61pub type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<62 Runtime,63 { MILLISECS_PER_RELAY_BLOCK as u32 },64 BLOCK_PROCESSING_VELOCITY,65 UNINCLUDED_SEGMENT_CAPACITY,66>;