Skip to content

Commit

Permalink
move into stream
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Sep 21, 2024
1 parent ed10771 commit 06cca3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/provider/src/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ impl<T: Transport + Clone, N: Network> NewBlocks<T, N> {
}

fn into_poll_stream(mut self) -> impl Stream<Item = N::BlockResponse> + 'static {
stream! {
let poll_task_builder: PollerBuilder<T, NoParams, U64> =
PollerBuilder::new(self.client.clone(), "eth_blockNumber", []);
let mut poll_task = poll_task_builder.spawn().into_stream_raw();
stream! {
'task: loop {
// Clear any buffered blocks.
while let Some(known_block) = self.known_blocks.pop(&self.next_yield) {
Expand Down

0 comments on commit 06cca3a

Please sign in to comment.