Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Change pallet naming in test-runtime #3551

Merged
3 commits merged into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion node/test/service/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ fn polkadot_testnet_genesis(
},
vesting: runtime::VestingConfig { vesting: vec![] },
sudo: runtime::SudoConfig { key: root_key },
parachains_configuration: runtime::ParachainsConfigurationConfig {
configuration: runtime::ConfigurationConfig {
config: polkadot_runtime_parachains::configuration::HostConfiguration {
validation_upgrade_frequency: 10u32,
validation_upgrade_delay: 5,
Expand Down
12 changes: 12 additions & 0 deletions runtime/parachains/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,18 @@ pub mod pallet {
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> {
Expand Down
2 changes: 1 addition & 1 deletion runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ construct_runtime! {
Vesting: pallet_vesting::{Pallet, Call, Storage, Event<T>, Config<T>},

// 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>},
ParasInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent},
Initializer: parachains_initializer::{Pallet, Call, Storage},
Expand Down