mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
handle peerinfo better
This commit is contained in:
parent
aeebe2a596
commit
4d4e447132
@ -753,9 +753,13 @@ impl NetworkManager {
|
||||
.get_outbound_node_ref_filter(RoutingDomain::PublicInternet)
|
||||
.with_protocol_type(ProtocolType::UDP);
|
||||
peer_nr.set_filter(Some(outbound_nrf));
|
||||
let hole_punch_dial_info_detail = peer_nr
|
||||
.first_filtered_dial_info_detail()
|
||||
.ok_or_else(|| eyre!("No hole punch capable dialinfo found for node"))?;
|
||||
let Some(hole_punch_dial_info_detail) = peer_nr.first_filtered_dial_info_detail()
|
||||
else {
|
||||
return Ok(NetworkResult::no_connection_other(format!(
|
||||
"No hole punch capable dialinfo found for node: {}",
|
||||
peer_nr
|
||||
)));
|
||||
};
|
||||
|
||||
// Now that we picked a specific dialinfo, further restrict the noderef to the specific address type
|
||||
let filter = peer_nr.take_filter().unwrap();
|
||||
|
@ -22,7 +22,7 @@ impl RoutingTable {
|
||||
// find N nodes closest to the target node in our routing table
|
||||
let own_peer_info = self.get_own_peer_info(RoutingDomain::PublicInternet);
|
||||
let filter = Box::new(
|
||||
move |rti: &RoutingTableInner, opt_entry: Option<Arc<BucketEntry>>| {
|
||||
|rti: &RoutingTableInner, opt_entry: Option<Arc<BucketEntry>>| {
|
||||
// Ensure only things that are valid/signed in the PublicInternet domain are returned
|
||||
if !rti.filter_has_valid_signed_node_info(
|
||||
RoutingDomain::PublicInternet,
|
||||
@ -50,7 +50,6 @@ impl RoutingTable {
|
||||
c.network.dht.max_find_node_count as usize
|
||||
};
|
||||
|
||||
let own_peer_info = self.get_own_peer_info(RoutingDomain::PublicInternet);
|
||||
let closest_nodes = match self.find_preferred_closest_nodes(
|
||||
node_count,
|
||||
key,
|
||||
|
Loading…
Reference in New Issue
Block a user