Skip to content
Snippets Groups Projects
Unverified Commit 2f26d713 authored by Branislav Kontur's avatar Branislav Kontur Committed by GitHub
Browse files

Update polkadot/runtime/parachains/src/paras/mod.rs


Co-authored-by: default avatarKian Paimani <5588131+kianenigma@users.noreply.github.com>
parent 1a8e1fd4
Branches 7896
No related merge requests found
Pipeline #519132 waiting for manual action with stages
in 3 minutes and 52 seconds
......@@ -2493,9 +2493,7 @@ impl<T: Config> Pallet<T> {
code: &ValidationCode,
para: &ParaId,
) -> Result<(ValidationCodeHash, BlockNumberFor<T>), Error<T>> {
let Some((authorized_code_hash, expire_at)) = AuthorizedCodeHash::<T>::get(para) else {
return Err(Error::<T>::NothingAuthorized);
};
let (authorized_code_hash, expire_at) = AuthorizedCodeHash::<T>::get(para).ok_or(Error::<T>::NothingAuthorized))?
ensure!(authorized_code_hash == code.hash(), Error::<T>::Unauthorized);
ensure!(
expire_at > frame_system::Pallet::<T>::block_number(),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment