Skip to content

Commit

Permalink
chore: fix code review nits
Browse files Browse the repository at this point in the history
  • Loading branch information
dimazhornyk committed Jun 18, 2024
1 parent a2c26bc commit 7ce721a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DROP TABLE data_availability;
DROP TABLE IF EXISTS data_availability;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE data_availability
CREATE TABLE IF NOT EXISTS data_availability
(
l1_batch_number BIGINT PRIMARY KEY REFERENCES l1_batches (number) ON DELETE CASCADE,

Expand Down
4 changes: 2 additions & 2 deletions core/lib/default_da_clients/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ categories.workspace = true

[dependencies]
serde = { workspace = true, features = ["derive"] }
tracing = "0.1.40"
async-trait = "0.1.74"
tracing.workspace = true
async-trait.workspace = true
anyhow.workspace = true

zksync_config.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions core/lib/default_da_clients/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pub mod object_store;

pub mod no_da;
pub mod object_store;
2 changes: 1 addition & 1 deletion core/lib/protobuf_config/src/da_dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl ProtoRepr for proto::DataAvailabilityDispatcher {
Self {
polling_interval_ms: this.polling_interval_ms,
max_rows_to_dispatch: this.max_rows_to_dispatch,
max_retries: this.max_retries.map(|x| x as u32),
max_retries: this.max_retries.map(Into::into),
}
}
}
1 change: 1 addition & 0 deletions core/lib/zksync_core_leftovers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ pub async fn initialize_components(
.da_dispatcher_config
.clone()
.context("da_dispatcher_config")?;
// A pool with size 2 is used here because there are 2 functions within a task that execute in parallel
let da_dispatcher_pool =
ConnectionPool::<Core>::builder(database_secrets.master_url()?, 2)
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ impl WiringLayer for DataAvailabilityDispatcherLayer {

async fn wire(self: Box<Self>, mut context: ServiceContext<'_>) -> Result<(), WiringError> {
let master_pool_resource = context.get_resource::<PoolResource<MasterPool>>().await?;
// A pool with size 2 is used here because there are 2 functions within a task that execute in parallel
let master_pool = master_pool_resource.get_custom(2).await?;
let da_client = context.get_resource::<DAClientResource>().await?.0;

Expand Down

0 comments on commit 7ce721a

Please sign in to comment.