Skip to content

Commit

Permalink
fix da_client node_framework
Browse files Browse the repository at this point in the history
  • Loading branch information
dimazhornyk committed Jul 2, 2024
1 parent 2d63d19 commit be72770
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions core/node/da_dispatcher/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate core;

pub use self::da_dispatcher::DataAvailabilityDispatcher;

mod da_dispatcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ 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?;
let master_pool_resource = context.get_resource::<PoolResource<MasterPool>>()?;
// 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;
let da_client = context.get_resource::<DAClientResource>()?.0;

if let Some(limit) = da_client.blob_size_limit() {
if self.state_keeper_config.max_pubdata_per_batch > limit as u64 {
Expand All @@ -48,11 +48,11 @@ impl WiringLayer for DataAvailabilityDispatcherLayer {
}
}

context.add_task(Box::new(DataAvailabilityDispatcher::new(
context.add_task(DataAvailabilityDispatcher::new(
master_pool,
self.da_config,
da_client,
)));
));

Ok(())
}
Expand Down

0 comments on commit be72770

Please sign in to comment.