diff --git a/beacon_node/network/src/sync/block_lookups/mod.rs b/beacon_node/network/src/sync/block_lookups/mod.rs index 6852761d8bf..d399807e75c 100644 --- a/beacon_node/network/src/sync/block_lookups/mod.rs +++ b/beacon_node/network/src/sync/block_lookups/mod.rs @@ -553,6 +553,7 @@ impl BlockLookups { Ok(LookupResult::Completed) } } + Ok(()) } /// Makes progress on the immediate children of `block_root` diff --git a/beacon_node/network/src/sync/block_lookups/single_block_lookup.rs b/beacon_node/network/src/sync/block_lookups/single_block_lookup.rs index b642ec8e5b2..be650b6d152 100644 --- a/beacon_node/network/src/sync/block_lookups/single_block_lookup.rs +++ b/beacon_node/network/src/sync/block_lookups/single_block_lookup.rs @@ -505,3 +505,14 @@ impl std::fmt::Display for State { } } } + +impl LookupRequestError { + pub(crate) fn as_metric(&self) -> &'static str { + match self { + LookupRequestError::TooManyAttempts { .. } => "TooManyAttempts", + LookupRequestError::NoPeers => "NoPeers", + LookupRequestError::SendFailed { .. } => "SendFailed", + LookupRequestError::BadState { .. } => "BadState", + } + } +}