diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 4f0ff0af0..b1dde8077 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -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 ¶threads { - 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); } }