mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-12-25 15:29:32 -05:00
node not own relay detection bug
This commit is contained in:
parent
532ef0b9ac
commit
08f3caf181
@ -810,7 +810,7 @@ impl RoutingTableInner {
|
||||
peer_info: PeerInfo,
|
||||
allow_invalid: bool,
|
||||
) -> Option<NodeRef> {
|
||||
// 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user