INNER CODE UNIT · Rust

Some

AstarNetwork/Astar · pallets/collator-selection/src/lib.rs:458

                if let Some((index, deposit)) = maybe.take() {
                    ensure!(
                        T::ValidatorSet::session_index() >= index,
                        Error::<T>::BondStillLocked
                    );
                    T::Currency::unreserve(&who, deposit);
                    <LastAuthoredBlock<T>>::remove(&who);
                    Ok(())
                } else {
                    Err(Error::<T>::NoCandidacyBond.into())
                }
            })?;

            Ok(())
        }

        /// Set slash destination.
        /// Use `Some` to deposit slashed balance into destination or `None` to burn it.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…