Skip to content

Commit

Permalink
fix: add debug logs to OverlayService::find_enr
Browse files Browse the repository at this point in the history
  • Loading branch information
morph-dev committed Dec 7, 2024
1 parent 3db8488 commit a26f0e1
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit a26f0e1

Please sign in to comment.