This commit is contained in:
John Smith
2022-07-05 21:21:58 -04:00
parent 36f95692f6
commit 895fbf77c5
4 changed files with 27 additions and 16 deletions

View File

@@ -717,7 +717,8 @@ impl NetworkManager {
fn get_contact_method(&self, mut target_node_ref: NodeRef) -> Result<ContactMethod, String> {
let routing_table = self.routing_table();
// Get our network class and protocol config
// Get our network class and protocol config and node id
let our_node_id = routing_table.node_id();
let our_network_class = self.get_network_class().unwrap_or(NetworkClass::Invalid);
let our_protocol_config = self.get_protocol_config().unwrap();
@@ -744,6 +745,7 @@ impl NetworkManager {
}
// Get the target's inbound relay, it must have one or it is not reachable
// Note that .relay() never returns our own node. We can't relay to ourselves.
if let Some(inbound_relay_nr) = target_node_ref.relay() {
// Can we reach the inbound relay?
if inbound_relay_nr
@@ -1334,7 +1336,7 @@ impl NetworkManager {
// Re-send our node info if we selected a relay
if node_info_changed {
self.routing_table().send_node_info_updates().await;
self.routing_table().send_node_info_updates(true).await;
}
Ok(())

View File

@@ -519,7 +519,7 @@ impl Network {
self.inner.lock().network_started = true;
// Inform routing table entries that our dial info has changed
self.routing_table().send_node_info_updates().await;
self.routing_table().send_node_info_updates(true).await;
Ok(())
}

View File

@@ -644,7 +644,7 @@ impl Network {
log_net!(debug "network class changed to {:?}", network_class);
// Send updates to everyone
routing_table.send_node_info_updates().await;
routing_table.send_node_info_updates(true).await;
}
Ok(())