mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 21:41:02 +00:00
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:
@@ -294,6 +294,9 @@ decl_module! {
|
||||
fn deposit_event() = default;
|
||||
|
||||
/// Create a new crowdloaning campaign for a parachain slot with the given lease period range.
|
||||
///
|
||||
/// This applies a lock to your parachain configuration, ensuring that it cannot be changed
|
||||
/// by the parachain manager.
|
||||
#[weight = T::WeightInfo::create()]
|
||||
pub fn create(origin,
|
||||
#[compact] index: ParaId,
|
||||
@@ -342,6 +345,8 @@ decl_module! {
|
||||
});
|
||||
|
||||
NextTrieIndex::put(new_trie_index);
|
||||
// Add a lock to the para so that the configuration cannot be changed.
|
||||
T::Registrar::apply_lock(index);
|
||||
|
||||
Self::deposit_event(RawEvent::Created(index));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user