Helper function to determine if any path can be constructred through topology

This commit is contained in:
Jedrzej Stuczynski
2020-01-14 12:40:25 +00:00
parent 63cebd27cd
commit 9082e93826
+7
View File
@@ -192,6 +192,13 @@ pub trait NymTopology: Sized {
Self::new_from_nodes(filtered_mixes, filtered_providers, filtered_coco_nodes)
}
fn can_construct_path_through(&self) -> bool {
match self.make_layered_topology() {
Ok(_) => true,
Err(_) => false,
}
}
}
// TODO: tests...