Skip to content

Commit

Permalink
Merge of #5837
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored May 24, 2024
2 parents a1271bc + 5b5266c commit 98c5ea7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion beacon_node/network/src/sync/block_lookups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,11 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// dropped.
pub fn drop_lookup_and_children(&mut self, dropped_id: SingleLookupId) {
if let Some(dropped_lookup) = self.single_block_lookups.remove(&dropped_id) {
debug!(self.log, "Dropping child lookup"; "id" => ?dropped_id, "block_root" => ?dropped_lookup.block_root());
debug!(self.log, "Dropping lookup";
"id" => ?dropped_id,
"block_root" => ?dropped_lookup.block_root(),
"awaiting_parent" => ?dropped_lookup.awaiting_parent(),
);

let child_lookups = self
.single_block_lookups
Expand Down Expand Up @@ -663,6 +667,9 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
}
false
}
// If UnknownLookup do not log the request error. No need to drop child lookups nor
// update metrics because the lookup does not exist.
Err(LookupRequestError::UnknownLookup) => false,
Err(error) => {
debug!(self.log, "Dropping lookup on request error"; "id" => id, "source" => source, "error" => ?error);
metrics::inc_counter_vec(&metrics::SYNC_LOOKUP_DROPPED, &[error.into()]);
Expand Down

0 comments on commit 98c5ea7

Please sign in to comment.