INNER CODE UNIT · Rust
convert
AstarNetwork/Astar · pallets/collator-selection/src/lib.rs:131
fn convert(t: T) -> Option<T> {
Some(t)
}
}
/// Used to check whether an account is allowed to be a candidate.
pub trait AccountCheck<AccountId> {
/// `true` if the account is allowed to be a candidate, `false` otherwise.
fn allowed_candidacy(account: &AccountId) -> bool;
}
/// Configure the pallet by specifying the parameters and types on which it depends.
#[pallet::config]
pub trait Config: frame_system::Config {
/// The currency mechanism.
type Currency: ReservableCurrency<Self::AccountId>;
/// Origin that can dictate updating parameters of this pallet.