From dc1c438e92a451e10d9b99600a76627225f92627 Mon Sep 17 00:00:00 2001 From: eitanm-starkware Date: Tue, 10 Dec 2024 11:50:00 +0200 Subject: [PATCH] chore(papyrus_p2p_sync): add block data receiver to p2psyncclient --- crates/papyrus_p2p_sync/src/client/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/papyrus_p2p_sync/src/client/mod.rs b/crates/papyrus_p2p_sync/src/client/mod.rs index 01e13465f72..e2e39c14505 100644 --- a/crates/papyrus_p2p_sync/src/client/mod.rs +++ b/crates/papyrus_p2p_sync/src/client/mod.rs @@ -19,6 +19,7 @@ use std::time::Duration; use class::ClassStreamBuilder; use futures::channel::mpsc::SendError; +use futures::stream::BoxStream; use futures::Stream; use header::HeaderStreamBuilder; use papyrus_common::pending_classes::ApiContractClass; @@ -41,7 +42,7 @@ use starknet_api::block::BlockNumber; use starknet_api::core::ClassHash; use starknet_api::transaction::FullTransaction; use state_diff::StateDiffStreamBuilder; -use stream_builder::{DataStreamBuilder, DataStreamResult}; +use stream_builder::{BlockData, DataStreamBuilder, DataStreamResult}; use tokio_stream::StreamExt; use tracing::instrument; use transaction::TransactionStreamFactory; @@ -226,6 +227,7 @@ pub struct P2PSyncClient { storage_reader: StorageReader, storage_writer: StorageWriter, p2p_sync_channels: P2PSyncClientChannels, + block_data_receiver: BoxStream, } impl P2PSyncClient {