From a121f6272f8b48bfabc3db3015b90c867a11ef56 Mon Sep 17 00:00:00 2001 From: Yurii Koba Date: Thu, 10 Oct 2024 18:29:32 +0300 Subject: [PATCH] fmt --- rpc-server/src/utils.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpc-server/src/utils.rs b/rpc-server/src/utils.rs index 1a47688e..9cc6f2a3 100644 --- a/rpc-server/src/utils.rs +++ b/rpc-server/src/utils.rs @@ -234,9 +234,9 @@ async fn task_update_optimistic_block_regularly( async fn task_optimistic_block_status() { tracing::info!("Task to check optimistic block status started"); loop { - // check every 2 seconds - tokio::time::sleep(std::time::Duration::from_secs(2)).await; - + // check every second + tokio::time::sleep(std::time::Duration::from_secs(1)).await; + // When an optimistic block is not updated, or it is lower than the final block // we need to mark that optimistic updating is not working if crate::metrics::LATEST_BLOCK_HEIGHT_BY_FINALITIY