Skip to content

Commit

Permalink
fix: use_dummy_inclusion_data condition (#3244)
Browse files Browse the repository at this point in the history
## What ❔

Fix invalid `if` usage for `use_dummy_inclusion_data` flag.

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## 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 `zkstack dev fmt` and `zkstack dev
lint`.
  • Loading branch information
dimazhornyk authored Nov 12, 2024
1 parent 5cea9ec commit 6e3c36e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/node/da_dispatcher/src/da_dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ impl DataAvailabilityDispatcher {
};

let inclusion_data = if self.config.use_dummy_inclusion_data() {
Some(InclusionData { data: vec![] })
} else {
self.client
.get_inclusion_data(blob_info.blob_id.as_str())
.await
Expand All @@ -146,10 +148,6 @@ impl DataAvailabilityDispatcher {
blob_info.blob_id, blob_info.l1_batch_number
)
})?
} else {
// if the inclusion verification is disabled, we don't need to wait for the inclusion
// data before committing the batch, so simply return an empty vector
Some(InclusionData { data: vec![] })
};

let Some(inclusion_data) = inclusion_data else {
Expand Down

0 comments on commit 6e3c36e

Please sign in to comment.