Skip to content

Commit

Permalink
Tweak comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ackintosh committed Dec 27, 2023
1 parent 47a82f7 commit 2984456
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions beacon_node/lighthouse_network/src/discovery/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ impl<TSpec: EthSpec> Discovery<TSpec> {
.partition(|q| q.target == DiscoveryTarget::Random);

if !random_search.is_empty() {
// build the subnet predicate as a combination of the eth2_fork_predicate and the subnet predicate
// Build the subnet predicate as a combination of the eth2_fork_predicate and the subnet predicate
let subnet_predicate = subnet_predicate::<TSpec>(
random_search.iter().map(|q| q.subnet).collect::<Vec<_>>(),
&self.log,
Expand All @@ -755,10 +755,6 @@ impl<TSpec: EthSpec> Discovery<TSpec> {
if !prefix_search.is_empty() {
// Split the grouped subnet query into individual queries in order to prefix search.
for prefix_query in prefix_search {
// build the subnet predicate as a combination of the eth2_fork_predicate and the subnet predicate
let subnet_predicate =
subnet_predicate::<TSpec>(vec![prefix_query.subnet], &self.log);

// Target node
let target_node = match &prefix_query.target {
DiscoveryTarget::Random => unreachable!("target should be Prefix here"),
Expand Down Expand Up @@ -787,6 +783,9 @@ impl<TSpec: EthSpec> Discovery<TSpec> {
}
}
};
// Build the subnet predicate as a combination of the eth2_fork_predicate and the subnet predicate
let subnet_predicate =
subnet_predicate::<TSpec>(vec![prefix_query.subnet], &self.log);
debug!(
self.log,
"Starting prefix search query";
Expand Down

0 comments on commit 2984456

Please sign in to comment.