Skip to content

Commit beed333

Browse files
apollo_batcher_types: add BatcherStorageReaderServerHandler
1 parent 8130b3b commit beed333

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/apollo_batcher_types/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ apollo_infra.workspace = true
1616
apollo_metrics.workspace = true
1717
apollo_proc_macros.workspace = true
1818
apollo_state_sync_types.workspace = true
19+
apollo_storage.workspace = true
1920
async-trait.workspace = true
2021
blockifier = { workspace = true, features = ["transaction_serde"] }
2122
chrono = { workspace = true, features = ["serde"] }

crates/apollo_batcher_types/src/batcher_types.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
use std::fmt::Debug;
22

3+
use apollo_storage::storage_reader_server::StorageReaderServerHandler;
4+
use apollo_storage::{StorageError, StorageReader};
5+
use async_trait::async_trait;
36
use blockifier::blockifier::transaction_executor::CompiledClassHashesForMigration;
47
use blockifier::bouncer::{BouncerWeights, CasmHashComputationData};
58
use blockifier::state::cached_state::CommitmentStateDiff;
@@ -163,4 +166,19 @@ pub enum BatcherStorageResponse {
163166
Table1Replacer(BlockHeader),
164167
}
165168

169+
pub struct BatcherStorageReaderServerHandler;
170+
171+
#[async_trait]
172+
impl StorageReaderServerHandler<BatcherStorageRequest, BatcherStorageResponse>
173+
for BatcherStorageReaderServerHandler
174+
{
175+
async fn handle_request(
176+
_storage_reader: &StorageReader,
177+
_request: BatcherStorageRequest,
178+
) -> Result<BatcherStorageResponse, StorageError> {
179+
// TODO(Dean/Nadin): Implement the logic for the batcher storage reader server handler.
180+
unimplemented!()
181+
}
182+
}
183+
166184
pub type BatcherResult<T> = Result<T, BatcherError>;

0 commit comments

Comments
 (0)