Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Remove consistency check from migration
Browse files Browse the repository at this point in the history
Re-addig these checks is blocked on #7108

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez committed Apr 25, 2023
1 parent 7503530 commit 1519705
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions runtime/parachains/src/configuration/migration_ump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ pub mod latest {
log::info!(target: LOG_TARGET, "pre_upgrade");
let mut pending = PendingConfigs::<T>::get();
pending.sort_by_key(|(s, _)| *s);
pending.last().map(|(_, cfg)| cfg.panic_if_not_consistent());

log::info!(
target: LOG_TARGET,
Expand Down Expand Up @@ -106,21 +105,6 @@ pub mod latest {
"There must be a new pending upgrade enqueued"
);

let mut any_pending_valid = false;
PendingConfigs::<T>::get().iter().for_each(|(s, cfg)| {
log::info!(target: LOG_TARGET, "Checking config s={}", s);
cfg.panic_if_not_consistent();
any_pending_valid = true;
});

if let Err(err) = ActiveConfig::<T>::get().check_consistency() {
if any_pending_valid {
log::error!(target: LOG_TARGET, "The ActiveConfig is inconsistent: {:?}. We tolerate this since there are pending consistent upgrades.", err);
} else {
panic!("The ActiveConfig is inconsistent: {:?} and there are no pending consistent ones.", err)
}
}

Ok(())
}
}
Expand Down

0 comments on commit 1519705

Please sign in to comment.