Skip to content

Commit

Permalink
fix(node_framework): Use custom pool for commitiment generator (#2076)
Browse files Browse the repository at this point in the history
## What ❔

We create a custom pool for commitment generator in
`initialize_components`, but use "global" pool in the framework.

## Why ❔

Align implementations.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `zk spellcheck`.
  • Loading branch information
popzxc authored May 28, 2024
1 parent c127ff1 commit 994df8f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ impl WiringLayer for CommitmentGeneratorLayer {

async fn wire(self: Box<Self>, mut context: ServiceContext<'_>) -> Result<(), WiringError> {
let pool_resource = context.get_resource::<PoolResource<MasterPool>>().await?;
let main_pool = pool_resource.get().await?;
let pool_size = CommitmentGenerator::default_parallelism().get();
let main_pool = pool_resource.get_custom(pool_size).await?;

let commitment_generator = CommitmentGenerator::new(main_pool, self.mode);

Expand Down

0 comments on commit 994df8f

Please sign in to comment.