Skip to content

Commit

Permalink
Code review changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
piohei committed Sep 5, 2024
1 parent 575d7cb commit b5dd577
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::task_runner::TaskRunner;
use crate::tasks;

pub struct Service {
_app: Arc<App>,
app: Arc<App>,
local_addr: SocketAddr,
server_handle: JoinHandle<eyre::Result<()>>,
}
Expand Down Expand Up @@ -50,7 +50,7 @@ impl Service {
initialize_predefined_values(&app).await?;

Ok(Self {
_app: app,
app: app,

Check failure on line 53 in src/service.rs

View workflow job for this annotation

GitHub Actions / cargo test

redundant field names in struct initialization

Check failure on line 53 in src/service.rs

View workflow job for this annotation

GitHub Actions / cargo test

redundant field names in struct initialization
local_addr,
server_handle,
})
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions tests/common/service_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
}

Expand Down

0 comments on commit b5dd577

Please sign in to comment.