Skip to content

Commit

Permalink
add router parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Mar 26, 2024
1 parent c7831f5 commit cf50fa0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mantis/node/src/bin/mantis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ use mantis_node::{
#[tokio::main]
async fn main() {
let args = MantisArgs::parsed();

match args.command {
MantisCommands::Solve(_) => todo!(),
MantisCommands::Simulate(_) => todo!(),

MantisCommands::Id(_) => todo!(),
MantisCommands::Glt(_) => todo!(),
}

match args.command {
MantisCommands::Solve(args) => {
let mut wasm_read_client = create_wasm_query_client(&args.grpc_centauri).await;
Expand Down
5 changes: 5 additions & 0 deletions mantis/node/src/mantis/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ pub struct MantisArgs {

#[derive(Debug, Subcommand)]
pub enum MantisCommands {
/// solves orders
Solve(SolverArgs),
Id(IdArgs),
/// spams chain with test orders
Simulate(SimulateArgs),
Glt(GltArgs),
}
Expand Down Expand Up @@ -107,6 +109,9 @@ pub struct SolverArgs {
/// the problem to solve
#[arg(long, default_value_t = 10)]
pub solve_period_seconds: u16,

/// http url to call with parameters to obtain route
pub solution_provider: String,
}

impl MantisArgs {
Expand Down

0 comments on commit cf50fa0

Please sign in to comment.