Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Knopik <107140945+dknopik@users.noreply.github.com>
  • Loading branch information
diegomrsantos and dknopik committed Jan 14, 2025
1 parent 7bd1908 commit 6135c33
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions anchor/network/src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,21 @@ impl Discovery {

match query.result {
Ok(r) if r.is_empty() => {
debug!(subnets_searched_for = ?subnets_searched_for, "Grouped subnet discovery query yielded no results.");
debug!(
subnets_searched_for = ?subnets_searched_for,
"Grouped subnet discovery query yielded no results.",
);
// TODO queries.iter().for_each(|query| {
// self.add_subnet_query(query.subnet, query.min_ttl, query.retries + 1);
// })
}
Ok(r) => {
let results = r.into_iter().map(|enr| (enr, None)).collect();
debug!(peers = ?results, subnets_searched_for = ?subnets_searched_for, "Peer grouped subnet discovery request completed");
debug!(
peers = ?results,
subnets_searched_for = ?subnets_searched_for,
"Peer grouped subnet discovery request completed",
);

return Some(results);
}
Expand Down

0 comments on commit 6135c33

Please sign in to comment.