Skip to content

Commit 6e3c36e

Browse files
authored
fix: use_dummy_inclusion_data condition (matter-labs#3244)
## 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`.
1 parent 5cea9ec commit 6e3c36e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core/node/da_dispatcher/src/da_dispatcher.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ impl DataAvailabilityDispatcher {
137137
};
138138

139139
let inclusion_data = if self.config.use_dummy_inclusion_data() {
140+
Some(InclusionData { data: vec![] })
141+
} else {
140142
self.client
141143
.get_inclusion_data(blob_info.blob_id.as_str())
142144
.await
@@ -146,10 +148,6 @@ impl DataAvailabilityDispatcher {
146148
blob_info.blob_id, blob_info.l1_batch_number
147149
)
148150
})?
149-
} else {
150-
// if the inclusion verification is disabled, we don't need to wait for the inclusion
151-
// data before committing the batch, so simply return an empty vector
152-
Some(InclusionData { data: vec![] })
153151
};
154152

155153
let Some(inclusion_data) = inclusion_data else {

0 commit comments

Comments
 (0)