Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
girazoki committed Feb 7, 2024
1 parent b7cc9ab commit 181b8c5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pallets/collator-assignment/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,23 @@ pub mod pallet {
// TODO: this probably is asking for a refactor
// only apply the onCollatorAssignedHook if sufficient collators
for para_id in &container_chain_ids {
if !new_assigned.container_chains.get(para_id).unwrap_or(&vec![]).is_empty() {
if !new_assigned
.container_chains
.get(para_id)
.unwrap_or(&vec![])
.is_empty()
{
T::CollatorAssignmentHook::on_collators_assigned(*para_id);
}
}

for para_id in &parathreads {
if !new_assigned.container_chains.get(para_id).unwrap_or(&vec![]).is_empty() {
if !new_assigned
.container_chains
.get(para_id)
.unwrap_or(&vec![])
.is_empty()
{
T::CollatorAssignmentHook::on_collators_assigned(*para_id);
}
}
Expand Down

0 comments on commit 181b8c5

Please sign in to comment.