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

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pepyakin committed Dec 20, 2021
1 parent 945a3fb commit 4e47095
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions runtime/parachains/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1070,19 +1070,19 @@ impl<T: Config> Pallet<T> {
return
}

let (past_and_now, future) = pending_configs
let (past_and_present, future) = pending_configs
.into_iter()
.partition::<Vec<_>, _>(|&(apply_at_session, _)| apply_at_session <= *session_index);

if past_and_now.len() > 1 {
if past_and_present.len() > 1 {
// This should never happen since we schedule configuration changes only into the future
// sessions and this handler called for each session change.
log::error!(
target: LOG_TARGET,
"Skipping applying configuration changes scheduled sessions in the past",
);
}
if let Some((_, pending)) = past_and_now.last() {
if let Some((_, pending)) = past_and_present.last() {
<Self as Store>::ActiveConfig::put(pending);
}

Expand Down Expand Up @@ -1211,7 +1211,7 @@ mod tests {
}

#[test]
fn consequtive_changes_within_one_session() {
fn consecutive_changes_within_one_session() {
new_test_ext(Default::default()).execute_with(|| {
let old_config = Configuration::config();
let mut config = old_config.clone();
Expand Down

0 comments on commit 4e47095

Please sign in to comment.