From d21a7f15aefaf0f73ab76d9e52183f768360df17 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Mon, 22 Apr 2024 10:59:59 +1000 Subject: [PATCH] Small tweaks --- beacon_node/beacon_chain/src/beacon_chain.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index 1cf8a4a0bdc..103933071c8 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -3011,7 +3011,6 @@ impl BeaconChain { // Set observed time if not already set. Usually this should be set by gossip or RPC, // but just in case we set it again here (useful for tests). - #[cfg(test)] if let Some(seen_timestamp) = self.slot_clock.now_duration() { self.block_times_cache.write().set_time_observed( block_root, @@ -3270,8 +3269,10 @@ impl BeaconChain { } = import_data; // This is the time since start of the slot where all the components of the block have become available - let delay = get_slot_delay_ms(timestamp_now(), block.slot(), &self.slot_clock); - metrics::set_gauge(&metrics::BLOCK_AVAILABILITY_DELAY, delay.as_millis() as i64); + metrics::set_gauge( + &metrics::BLOCK_AVAILABILITY_DELAY, + block.available_timestamp().as_millis() as i64, + ); // Record the time at which this block became available. self.block_times_cache.write().set_time_available( block_root,