Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions clients/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,18 @@ async fn main() -> Result<(), Box<dyn Error>> {
/// * `check_mem` - Whether to check risky memory usage.
/// * `with_background` - Whether to use the alternate TUI background color.
/// * `max_tasks` - Optional maximum number of tasks to prove.

fn validate_difficulty(difficulty_str: &str) -> Option<crate::nexus_orchestrator::TaskDifficulty> {
match difficulty_str.trim().to_ascii_uppercase().as_str() {
"SMALL" => Some(crate::nexus_orchestrator::TaskDifficulty::Small),
"SMALL_MEDIUM" => Some(crate::nexus_orchestrator::TaskDifficulty::SmallMedium),
"MEDIUM" => Some(crate::nexus_orchestrator::TaskDifficulty::Medium),
"LARGE" => Some(crate::nexus_orchestrator::TaskDifficulty::Large),
"EXTRA_LARGE" => Some(crate::nexus_orchestrator::TaskDifficulty::ExtraLarge),
Comment thread
Olexandr88 marked this conversation as resolved.
Outdated
_ => None,
}
}

/// * `show_mock_notification` - [Debug] Show rewards overlay on startup for testing.
#[allow(clippy::too_many_arguments)]
async fn start(
Expand Down Expand Up @@ -308,6 +320,7 @@ async fn start(

#[cfg(test)]
mod tests {
use super::validate_difficulty;
use crate::nexus_orchestrator::TaskDifficulty;

#[test]
Expand Down