Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add debug logs to OverlayService::find_enr #1600

Merged
merged 1 commit into from
Dec 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions portalnet/src/overlay/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2436,11 +2436,13 @@ impl<

// Check whether this node id is in our discv5 routing table
if let Some(enr) = self.discovery.find_enr(node_id) {
debug!(node_id=%node_id, enr=%enr, "#1596: discv5 routing table");
return Some(enr);
}

// Check whether this node id is in our discovery ENR cache
if let Some(node_addr) = self.discovery.cached_node_addr(node_id) {
debug!(node_id=%node_id, enr=?node_addr, "#1596: cached node addr");
return Some(node_addr.enr);
}

Expand All @@ -2451,6 +2453,7 @@ impl<
.iter()
.find(|v| v.node_id() == *node_id)
{
debug!(node_id=%node_id, enr=%enr, "#1596: node query_pool");
return Some(enr.clone());
}
}
Expand All @@ -2462,10 +2465,12 @@ impl<
.iter()
.find(|v| v.node_id() == *node_id)
{
debug!(node_id=%node_id, enr=%enr, "#1596: content query_pool");
return Some(enr.clone());
}
}

debug!(node_id=%node_id, "#1596: none");
None
}

Expand Down