From b5dd5773737f4d76699dbf89c7d3e88611f614dd Mon Sep 17 00:00:00 2001 From: Piotr Heilman Date: Thu, 5 Sep 2024 12:05:52 +0200 Subject: [PATCH] Code review changes. --- src/service.rs | 8 ++++---- tests/common/service_builder.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/service.rs b/src/service.rs index 8a40841..ef9f35b 100644 --- a/src/service.rs +++ b/src/service.rs @@ -11,7 +11,7 @@ use crate::task_runner::TaskRunner; use crate::tasks; pub struct Service { - _app: Arc, + app: Arc, local_addr: SocketAddr, server_handle: JoinHandle>, } @@ -50,7 +50,7 @@ impl Service { initialize_predefined_values(&app).await?; Ok(Self { - _app: app, + app: app, local_addr, server_handle, }) @@ -83,9 +83,9 @@ impl Service { Ok(()) } - pub async fn is_estimates_ready_for_chain(&self, chain_id: u64) -> bool { + pub async fn are_estimates_ready_for_chain(&self, chain_id: u64) -> bool { let res = self - ._app + .app .db .get_latest_block_fees_by_chain_id(chain_id) .await; diff --git a/tests/common/service_builder.rs b/tests/common/service_builder.rs index d517b70..ed80d22 100644 --- a/tests/common/service_builder.rs +++ b/tests/common/service_builder.rs @@ -95,18 +95,18 @@ impl ServiceBuilder { TxSitterClient::new(format!("http://{}", service.local_addr())); // Awaits for estimates to be ready - let mut is_estimates_ready = false; + let mut are_estimates_ready = false; for _ in 0..30 { if service - .is_estimates_ready_for_chain(DEFAULT_ANVIL_CHAIN_ID) + .are_estimates_ready_for_chain(DEFAULT_ANVIL_CHAIN_ID) .await { - is_estimates_ready = true; + are_estimates_ready = true; break; } tokio::time::sleep(Duration::from_secs(1)).await; } - if !is_estimates_ready { + if !are_estimates_ready { eyre::bail!("Estimates were not ready!"); }