Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
1xstj committed Nov 7, 2023
1 parent 0244180 commit f6cec03
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pallets/jobs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ pub mod module {
NoRewards,
/// Not enough validators to exit
NotEnoughValidators,
/// empty result
EmptyResult,
/// empty job
EmptyJob,
}

#[pallet::event]
Expand Down Expand Up @@ -308,6 +312,9 @@ pub mod module {
) -> DispatchResult {
let _caller = ensure_signed(origin)?;

// sanity check
ensure!(result.is_empty(), Error::<T>::EmptyResult);

// Ensure the job exists
let job_info =
SubmittedJobs::<T>::get(job_key.clone(), job_id).ok_or(Error::<T>::JobNotFound)?;
Expand Down

0 comments on commit f6cec03

Please sign in to comment.