Skip to content

Commit

Permalink
building edge graph
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Apr 7, 2024
1 parent e59942a commit 042e56a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mantis/node/src/bin/mantis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ async fn solve(
&cvm_glt,
pair_solution.ab.clone(),
);
let cvm_route = panic!(); //blackbox::get_route(router_api, bank, &cvm_glt, salt.as_ref()).await;
let cvm_route = blackbox::get_route(router_api, bank, &cvm_glt, salt.as_ref()).await;
send_solution(
pair_solution.cows,
cvm_route,
Expand Down
3 changes: 2 additions & 1 deletion mantis/node/src/mantis/blackbox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ pub async fn get_route(
salt: &[u8],
) -> CvmProgram {
if route_provider == "solver" {
return bf::route(input, cvm_glt, salt);
panic!();
bf::route(input, cvm_glt, salt);
} else {
let blackbox: Client = Client::new(route_provider);
let mut route = blackbox
Expand Down
8 changes: 4 additions & 4 deletions mantis/node/src/solver/router/bf.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use blackbox_rs::types::SingleInputAssetCvmRoute;
use cvm_runtime::shared::CvmProgram;
use petgraph::algo::{dijkstra, min_spanning_tree};
use petgraph::data::FromElements;
Expand All @@ -6,8 +7,7 @@ use petgraph::graph::{NodeIndex, UnGraph};

pub fn route(
input: crate::mantis::solve::IntentBankInput,
cvm_glt: &cvm_runtime::outpost::GetConfigResponse,
salt: &[u8],
) -> CvmProgram {
todo!()
cvm_glt: &cvm_runtime::outpost::GetConfigResponse,
) -> SingleInputAssetCvmRoute {
let g = petgraph::graph::DiGraph::new();
}

0 comments on commit 042e56a

Please sign in to comment.