Relax Origin Checks in Registrar, Add Lock to Registration (#2808)

* Relax Origin Checks in Registrar

* fix tests

* Update runtime/common/src/paras_registrar.rs

* introduce para locks

* apply a lock after upgrade

* add test

* add lock when creating crowdloan
This commit is contained in:
Shawn Tabrizi
2021-04-07 15:16:35 +02:00
committed by GitHub
parent 251b6ca7bf
commit 45be2ac97e
6 changed files with 136 additions and 53 deletions
+8
View File
@@ -47,6 +47,14 @@ pub trait Registrar {
Self::is_parathread(id) || Self::is_parachain(id)
}
/// Apply a lock to the para registration so that it cannot be modified by
/// the manager directly. Instead the para must use its sovereign governance
/// or the governance of the relay chain.
fn apply_lock(id: ParaId);
/// Remove any lock on the para registration.
fn remove_lock(id: ParaId);
/// Register a Para ID under control of `who`. Registration may be be
/// delayed by session rotation.
fn register(