Skip to content

Commit

Permalink
fix(overlay-service): Check for peer NodeId in discovery ENR cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
ogenev committed Sep 27, 2023
1 parent c5047d0 commit a7af9ef
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 @@ -2463,6 +2463,11 @@ where
return Some(entry.value().clone().enr());
}

// Check whether this node id is in our discovery ENR cache
if let Some(node_addr) = self.discovery.cached_node_addr(node_id) {
return Some(node_addr.enr);
}

// Check the existing find node queries for the ENR.
for (query_info, _) in self.find_node_query_pool.read().iter() {
if let Some(enr) = query_info
Expand Down

0 comments on commit a7af9ef

Please # to comment.