From 1473fcfc2f6ad943e9c724dc12454eac71209dea Mon Sep 17 00:00:00 2001 From: musitdev Date: Wed, 22 Jan 2025 17:28:52 +0100 Subject: [PATCH] change how celestia blob are fetch to test --- protocol-units/da/movement/protocol/da/src/lib.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/protocol-units/da/movement/protocol/da/src/lib.rs b/protocol-units/da/movement/protocol/da/src/lib.rs index ea0003002..aaa651441 100644 --- a/protocol-units/da/movement/protocol/da/src/lib.rs +++ b/protocol-units/da/movement/protocol/da/src/lib.rs @@ -107,7 +107,6 @@ pub trait DaOperations: Send + Sync { &self, start_height: u64, ) -> Pin> + Send + '_>> { - tracing::info!("TEST Da lib DaOperations stream_da_blobs_from_height start"); let fut = async move { let certificate_stream = self.stream_certificates().await?; let stream = try_stream! { @@ -120,13 +119,12 @@ pub trait DaOperations: Send + Sync { match certificate { Ok(Certificate::Height(height)) if height > last_height => { - let blob_stream = self - .stream_da_blobs_between_heights(last_height, height) - .await?; - tokio::pin!(blob_stream); - - while let Some(blob) = blob_stream.next().await { - yield blob?; + for height in last_height..height { + info!("getting certified blobs at height {}", height); + let blobs = self.get_da_blobs_at_height_for_stream(height).await?; + for blob in blobs { + yield (DaHeight(height), blob); + } } last_height = height;