From 08f3caf181afe1874c060f2aadc3d583db33afd9 Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 29 May 2023 14:57:44 -0400 Subject: [PATCH] node not own relay detection bug --- veilid-core/src/routing_table/routing_table_inner.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/veilid-core/src/routing_table/routing_table_inner.rs b/veilid-core/src/routing_table/routing_table_inner.rs index d66f7ed0..1d4b409c 100644 --- a/veilid-core/src/routing_table/routing_table_inner.rs +++ b/veilid-core/src/routing_table/routing_table_inner.rs @@ -810,7 +810,7 @@ impl RoutingTableInner { peer_info: PeerInfo, allow_invalid: bool, ) -> Option { - // if our own node if is in the list then ignore it, as we don't add ourselves to our own routing table + // if our own node is in the list, then ignore it as we don't add ourselves to our own routing table if self .unlocked_inner .matches_own_node_id(peer_info.node_ids()) @@ -821,7 +821,8 @@ impl RoutingTableInner { // node can not be its own relay let rids = peer_info.signed_node_info().relay_ids(); - if self.unlocked_inner.matches_own_node_id(&rids) { + let nids = peer_info.node_ids(); + if nids.contains_any(&rids) { log_rtab!(debug "node can not be its own relay"); return None; }