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

Apply suggestions from code review


Co-authored-by: default avatarBastian Köcher <git@kchr.de>
parent 4d746d20
Branches
No related merge requests found
Pipeline #515782 waiting for manual action with stages
in 45 seconds
...@@ -1182,19 +1182,7 @@ pub mod pallet { ...@@ -1182,19 +1182,7 @@ pub mod pallet {
) -> DispatchResult { ) -> DispatchResult {
ensure_root(origin)?; ensure_root(origin)?;
// if one is already authorized, means it has not been applied yet, so we just replace
// it.
if let Some(already_authorized) = AuthorizedCodeHash::<T>::take(para) {
log::warn!(
target: LOG_TARGET,
"Already authorized code hash: {:?} found for para {:?}, just removing it!",
already_authorized, para
);
}
// TODO: FAIL-CI - more validations?
// do we need to check against `FutureCodeHash`, `CodeHashRef`,
// `PastCodeHash`,... code hashes?
// insert authorized code hash. // insert authorized code hash.
AuthorizedCodeHash::<T>::insert(&para, new_code_hash); AuthorizedCodeHash::<T>::insert(&para, new_code_hash);
......
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