Unverified Commit a52dca2b authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

Change pallet naming in test-runtime (#3551)

* Change pallet naming in test-runtime

This is required to make the `well_know_keys::ACTIVE_CONFIG` match the
`ActiveConfig` key.

* Use correct name

* 🤦
parent c4ee9d46
Pipeline #150498 canceled with stages
in 5 minutes and 4 seconds
...@@ -158,7 +158,7 @@ fn polkadot_testnet_genesis( ...@@ -158,7 +158,7 @@ fn polkadot_testnet_genesis(
claims: runtime::ClaimsConfig { claims: vec![], vesting: vec![] }, claims: runtime::ClaimsConfig { claims: vec![], vesting: vec![] },
vesting: runtime::VestingConfig { vesting: vec![] }, vesting: runtime::VestingConfig { vesting: vec![] },
sudo: runtime::SudoConfig { key: root_key }, sudo: runtime::SudoConfig { key: root_key },
parachains_configuration: runtime::ParachainsConfigurationConfig { configuration: runtime::ConfigurationConfig {
config: polkadot_runtime_parachains::configuration::HostConfiguration { config: polkadot_runtime_parachains::configuration::HostConfiguration {
validation_upgrade_frequency: 10u32, validation_upgrade_frequency: 10u32,
validation_upgrade_delay: 5, validation_upgrade_delay: 5,
......
...@@ -765,6 +765,18 @@ pub mod pallet { ...@@ -765,6 +765,18 @@ pub mod pallet {
Ok(()) Ok(())
} }
} }
#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
fn integrity_test() {
assert_eq!(
&ActiveConfig::<T>::hashed_key(),
primitives::v1::well_known_keys::ACTIVE_CONFIG,
"`well_known_keys::ACTIVE_CONFIG` doesn't match key of `ActiveConfig`! Make sure that the name of the\
configuration pallet is `Configuration` in the runtime!",
);
}
}
} }
impl<T: Config> Pallet<T> { impl<T: Config> Pallet<T> {
......
...@@ -529,7 +529,7 @@ construct_runtime! { ...@@ -529,7 +529,7 @@ construct_runtime! {
Vesting: pallet_vesting::{Pallet, Call, Storage, Event<T>, Config<T>}, Vesting: pallet_vesting::{Pallet, Call, Storage, Event<T>, Config<T>},
// Parachains runtime modules // Parachains runtime modules
ParachainsConfiguration: parachains_configuration::{Pallet, Call, Storage, Config<T>}, Configuration: parachains_configuration::{Pallet, Call, Storage, Config<T>},
ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event<T>}, ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event<T>},
ParasInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent}, ParasInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent},
Initializer: parachains_initializer::{Pallet, Call, Storage}, Initializer: parachains_initializer::{Pallet, Call, Storage},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment