diff --git a/beacon_node/network/src/network_beacon_processor/gossip_methods.rs b/beacon_node/network/src/network_beacon_processor/gossip_methods.rs index 8baa0f773db..07173f2416b 100644 --- a/beacon_node/network/src/network_beacon_processor/gossip_methods.rs +++ b/beacon_node/network/src/network_beacon_processor/gossip_methods.rs @@ -907,17 +907,19 @@ impl NetworkBeaconProcessor { get_block_delay_ms(seen_duration, block.message(), &self.chain.slot_clock); // Log metrics to track delay from other nodes on the network. - metrics::set_gauge( - &metrics::BEACON_BLOCK_DELAY_GOSSIP, - block_delay.as_millis() as i64, - ); - let verification_result = self .chain .clone() .verify_block_for_gossip(block.clone()) .await; + if verification_result.is_ok() { + metrics::set_gauge( + &metrics::BEACON_BLOCK_DELAY_GOSSIP, + block_delay.as_millis() as i64, + ); + } + let block_root = if let Ok(verified_block) = &verification_result { verified_block.block_root } else {