find node by ip not by full ip,port addr

This commit is contained in:
Simon Wicky
2023-07-24 10:44:49 +02:00
parent 234656aba8
commit 8e4516a0a8
+2 -2
View File
@@ -110,13 +110,13 @@ impl NymTopology {
pub fn find_node_key_by_mix_host(&self, mix_host: SocketAddr) -> Option<&identity::PublicKey> {
for node in self.gateways.iter() {
if node.mix_host == mix_host {
if node.mix_host.ip() == mix_host.ip() {
return Some(&node.identity_key);
}
}
for nodes in self.mixes.values() {
for node in nodes {
if node.mix_host == mix_host {
if node.mix_host.ip() == mix_host.ip() {
return Some(&node.identity_key);
}
}