Function polkadot_runtime_parachains::paras::pallet::dispatchables::add_trusted_validation_code
source · pub fn add_trusted_validation_code<T: Config>(validation_code: ValidationCode)
Expand description
Adds the validation code to the storage.
The code will not be added if it is already present. Additionally, if PVF pre-checking is running for that code, it will be instantly accepted.
Otherwise, the code will be added into the storage. Note that the code will be added
into storage with reference count 0. This is to account the fact that there are no users
for this code yet. The caller will have to make sure that this code eventually gets
used by some parachain or removed from the storage to avoid storage leaks. For the
latter prefer to use the poke_unused_validation_code
dispatchable to raw storage
manipulation.
This function is mainly meant to be used for upgrading parachains that do not follow the go-ahead signal while the PVF pre-checking feature is enabled.
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::add_trusted_validation_code
.