Skip to content

Commit

Permalink
minimal set of changes to disable sequencer registration for non sudo…
Browse files Browse the repository at this point in the history
… users (#869)
  • Loading branch information
mateuszaaa authored Dec 10, 2024
2 parents 3722076 + a92a6e1 commit 32ebeea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pallets/sequencer-staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,9 @@ pub mod pallet {
stake_amount: BalanceOf<T>,
alias_account: Option<T::AccountId>,
stake_action: StakeAction,
sender: T::AccountId,
) -> DispatchResultWithPostInfo {
let sender = ensure_signed(origin)?;
let _ = ensure_root(origin)?;

ensure!(
!AliasAccountInUse::<T>::contains_key(sender.clone()),
Expand Down Expand Up @@ -468,8 +469,9 @@ pub mod pallet {
pub fn rejoin_active_sequencers(
origin: OriginFor<T>,
chain: T::ChainId,
sender: T::AccountId,
) -> DispatchResultWithPostInfo {
let sender = ensure_signed(origin)?;
let _ = ensure_root(origin)?;
ensure!(
!Self::is_active_sequencer(chain, &sender),
Error::<T>::SequencerAlreadyInActiveSet
Expand Down

0 comments on commit 32ebeea

Please sign in to comment.