From 6a2bcf8ba6dc6672772966a4e3b97616cb23fd8b Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Tue, 16 Jul 2024 08:19:17 -0700 Subject: [PATCH] fix: Ensure while loop terminates with error instead of skipping --- block-streamer/src/block_stream.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block-streamer/src/block_stream.rs b/block-streamer/src/block_stream.rs index 1a1eab71..74a34203 100644 --- a/block-streamer/src/block_stream.rs +++ b/block-streamer/src/block_stream.rs @@ -269,7 +269,7 @@ async fn process_bitmap_indexer_blocks( let mut last_published_block_height: u64 = start_block_height; - while let Some(Ok(block_height)) = matching_block_heights.next().await { + while let Some(block_height) = matching_block_heights.next().await.transpose()? { redis .publish_block(indexer, redis_stream.clone(), block_height, MAX_STREAM_SIZE) .await?;