refactor get_contact_method

This commit is contained in:
John Smith
2022-10-12 22:53:40 -04:00
parent a06c2fb5a3
commit 2d526674a5
8 changed files with 424 additions and 222 deletions

View File

@@ -341,7 +341,9 @@ impl VeilidAPI {
nr.merge_filter(NodeRefFilter::new().with_routing_domain(routing_domain))
}
let cm = network_manager.get_contact_method(nr);
let cm = routing_table
.get_node_contact_method(nr)
.map_err(VeilidAPIError::internal)?;
Ok(format!("{:#?}", cm))
}

View File

@@ -926,7 +926,7 @@ impl FromStr for SocketAddress {
//////////////////////////////////////////////////////////////////
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct DialInfoFilter {
pub protocol_type_set: ProtocolTypeSet,
pub address_type_set: AddressTypeSet,