mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-12-25 23:39:22 -05:00
Merge branch 'main' of gitlab.hackers.town:veilid/veilid
This commit is contained in:
commit
b7a9085f73
@ -550,6 +550,10 @@ impl RoutingTable {
|
|||||||
|
|
||||||
pub fn lookup_node_ref(&self, node_id: DHTKey) -> Option<NodeRef> {
|
pub fn lookup_node_ref(&self, node_id: DHTKey) -> Option<NodeRef> {
|
||||||
let inner = self.inner.read();
|
let inner = self.inner.read();
|
||||||
|
if node_id == self.node_id() {
|
||||||
|
log_rtab!(debug "can't look up own node id in routing table");
|
||||||
|
return None;
|
||||||
|
}
|
||||||
let idx = Self::find_bucket_index(&*inner, node_id);
|
let idx = Self::find_bucket_index(&*inner, node_id);
|
||||||
let bucket = &inner.buckets[idx];
|
let bucket = &inner.buckets[idx];
|
||||||
bucket
|
bucket
|
||||||
|
Loading…
Reference in New Issue
Block a user