Skip to content

Commit

Permalink
update cli tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JacqueGM committed Aug 7, 2023
1 parent 44f1564 commit b9550ca
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,32 @@ fn test_flow_chris_martin() {
}

#[test]
// Test between organisations - Herbie to Coop
fn test_flow_large() {
let edges = read_edges();
let large_source = Address::from("0x9BA1Bcd88E99d6E1E03252A70A63FEa83Bf1208c");
let large_dest = Address::from("0x939b2731997922f21ab0a0bab500a949c0fc3550");
test_flow(&large_source, &large_dest, &edges, U256::MAX, Some(4));
test_flow(&large_source, &large_dest, &edges, U256::MAX, Some(6));
let large_source = Address::from("0x3c89A829400Ea3B49F25738A1F4015A7961D0301");
let large_dest = Address::from("0x9BA1Bcd88E99d6E1E03252A70A63FEa83Bf1208c");
test_flow(&large_source, &large_dest, &edges, U256::MAX, None, Some(30));
// test_flow(&large_source, &large_dest, &edges, U256::MAX, Some(10));
}

fn read_edges() -> EdgeDB {
import_from_safes_binary("capacity_graph.db")
import_from_safes_binary("graph_at_20230523_15_00.db")
.unwrap()
.edges()
.clone()
}


fn test_flow(
source: &Address,
sink: &Address,
edges: &EdgeDB,
requested_flow: U256,
max_distance: Option<u64>,
max_transfers: Option<u64>,
) {
let transfers = compute_flow(source, sink, edges, requested_flow, max_distance, None);
let transfers = compute_flow(source, sink, edges, requested_flow, max_distance, max_transfers);
println!("{transfers:?}");

let token_owners = transfers
Expand Down

0 comments on commit b9550ca

Please sign in to comment.