INNER CODE UNIT · Rust
Some
AstarNetwork/Astar · pallets/collator-selection/src/lib.rs:522
if let Some(pos) = invulnerables.iter().position(|acc| *acc == who) {
invulnerables.remove(pos);
Ok(())
} else {
Err(Error::<T>::NotInvulnerable.into())
}
})?;
Self::deposit_event(Event::NewInvulnerables(<Invulnerables<T>>::get()));
Ok(().into())
}
/// Submit an application to become a collator candidate. The account must already have
/// registered session keys.
///
/// This call is not available to `Invulnerable` collators or exisiting candidates.
#[pallet::call_index(9)]
#[pallet::weight(T::WeightInfo::apply_for_candidacy())]