Add ParasSudoWrapper to test-runtime and bring back register_parachain to test-service (#1811)

* Make register/deregister parachain dispatchables

This makes `register_parachain` and `deregister_parachain` of
`Registrar` dispatchables.

Besides that it brings back the functionality of the test node to
register a parachain.

* Fix tests

* PR review comments
This commit is contained in:
Bastian Köcher
2020-10-16 09:45:03 +02:00
committed by GitHub
parent 3687c5df11
commit a7e9aedbc5
6 changed files with 52 additions and 20 deletions
+5 -2
View File
@@ -37,7 +37,7 @@ use primitives::v1::{
PersistedValidationData, Signature, ValidationCode, ValidationData, ValidatorId, ValidatorIndex,
};
use runtime_common::{
claims, SlowAdjustingFeeUpdate,
claims, SlowAdjustingFeeUpdate, paras_sudo_wrapper,
BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
MaximumBlockLength, BlockExecutionWeight, ExtrinsicBaseWeight, ParachainSessionKeyPlaceholder,
};
@@ -74,6 +74,7 @@ pub use pallet_staking::StakerStatus;
pub use sp_runtime::BuildStorage;
pub use pallet_timestamp::Call as TimestampCall;
pub use pallet_balances::Call as BalancesCall;
pub use paras_sudo_wrapper::Call as ParasSudoWrapperCall;
/// Constant values used within the runtime.
pub mod constants;
@@ -448,6 +449,8 @@ impl router::Trait for Runtime {}
impl scheduler::Trait for Runtime {}
impl paras_sudo_wrapper::Trait for Runtime {}
construct_runtime! {
pub enum Runtime where
Block = Block,
@@ -487,8 +490,8 @@ construct_runtime! {
Initializer: initializer::{Module, Call, Storage},
Paras: paras::{Module, Call, Storage, Origin},
Scheduler: scheduler::{Module, Call, Storage},
ParasSudoWrapper: paras_sudo_wrapper::{Module, Call},
// Sudo. Last module.
Sudo: pallet_sudo::{Module, Call, Storage, Config<T>, Event<T>},
}
}