Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
José Molina committed Dec 4, 2023
1 parent a7bebd3 commit 4426d4a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 32 deletions.
25 changes: 14 additions & 11 deletions runtime/stout/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,17 @@ parameter_types! {
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
}

/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included
/// into the relay chain.
const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;
/// How many parachain blocks are processed by the relay chain per parent. Limits the
/// number of blocks authored per slot.
const BLOCK_PROCESSING_VELOCITY: u32 = 1;
/// Relay chain slot duration, in milliseconds.
const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
#[cfg(feature = "parameterized-consensus-hook")]
mod consensus_hook_constants {
/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included
/// into the relay chain.
pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;
/// How many parachain blocks are processed by the relay chain per parent. Limits the
/// number of blocks authored per slot.
pub const BLOCK_PROCESSING_VELOCITY: u32 = 1;
/// Relay chain slot duration, in milliseconds.
pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
}

impl cumulus_pallet_parachain_system::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
Expand All @@ -309,9 +312,9 @@ impl cumulus_pallet_parachain_system::Config for Runtime {
#[cfg(feature = "parameterized-consensus-hook")]
type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<
Runtime,
RELAY_CHAIN_SLOT_DURATION_MILLIS,
BLOCK_PROCESSING_VELOCITY,
UNINCLUDED_SEGMENT_CAPACITY,
consensus_hook_constants::RELAY_CHAIN_SLOT_DURATION_MILLIS,
consensus_hook_constants::BLOCK_PROCESSING_VELOCITY,
consensus_hook_constants::UNINCLUDED_SEGMENT_CAPACITY,
>;
}

Expand Down
1 change: 0 additions & 1 deletion runtime/trappist/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
//! Auxiliary struct/enums for parachain runtimes.
//! Taken from polkadot/runtime/common (at a21cd64) and adapted for parachains.

use cumulus_primitives_core::DmpMessageHandler;
use frame_support::traits::{Currency, Imbalance, OnUnbalanced};
pub use log;
use sp_std::marker::PhantomData;
Expand Down
25 changes: 14 additions & 11 deletions runtime/trappist/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,17 @@ parameter_types! {
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
}

/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included
/// into the relay chain.
const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;
/// How many parachain blocks are processed by the relay chain per parent. Limits the
/// number of blocks authored per slot.
const BLOCK_PROCESSING_VELOCITY: u32 = 1;
/// Relay chain slot duration, in milliseconds.
const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
#[cfg(feature = "parameterized-consensus-hook")]
mod consensus_hook_constants {
/// Maximum number of blocks simultaneously accepted by the Runtime, not yet included
/// into the relay chain.
pub const UNINCLUDED_SEGMENT_CAPACITY: u32 = 1;
/// How many parachain blocks are processed by the relay chain per parent. Limits the
/// number of blocks authored per slot.
pub const BLOCK_PROCESSING_VELOCITY: u32 = 1;
/// Relay chain slot duration, in milliseconds.
pub const RELAY_CHAIN_SLOT_DURATION_MILLIS: u32 = 6000;
}

impl cumulus_pallet_parachain_system::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
Expand All @@ -323,9 +326,9 @@ impl cumulus_pallet_parachain_system::Config for Runtime {
#[cfg(feature = "parameterized-consensus-hook")]
type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<
Runtime,
RELAY_CHAIN_SLOT_DURATION_MILLIS,
BLOCK_PROCESSING_VELOCITY,
UNINCLUDED_SEGMENT_CAPACITY,
consensus_hook_constants::RELAY_CHAIN_SLOT_DURATION_MILLIS,
consensus_hook_constants::BLOCK_PROCESSING_VELOCITY,
consensus_hook_constants::UNINCLUDED_SEGMENT_CAPACITY,
>;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,6 @@ impl<T: frame_system::Config> WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub(crate) fn reserve_asset_deposited() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 500_000_000_000 picoseconds.
Weight::from_parts(500_000_000_000, 0)
}
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
Expand Down

0 comments on commit 4426d4a

Please sign in to comment.