Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Stream type for the pending block #10204

Closed
mattsse opened this issue Aug 8, 2024 · 0 comments · Fixed by #10249
Closed

Add Stream type for the pending block #10204

mattsse opened this issue Aug 8, 2024 · 0 comments · Fixed by #10249
Assignees
Labels
C-enhancement New feature or request

Comments

@mattsse
Copy link
Collaborator

mattsse commented Aug 8, 2024

Describe the feature

As prep for #5617

we need a helper stream type that makes use of the watch channel introduced in #10203

this should be a new type that wraps the receiver and emits new pending values, None values can be skipped.

see also:

/// A Stream of [`CanonStateNotification`].
#[derive(Debug)]
#[pin_project::pin_project]
pub struct CanonStateNotificationStream {
#[pin]
st: BroadcastStream<CanonStateNotification>,
}

see also tokio_stream::WatchStream

Ideally this stream type is generic over Option<T> so we can reuse this for the safe and finalized watchers as well

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Aug 8, 2024
@mattsse mattsse removed the S-needs-triage This issue needs to be labelled label Aug 8, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants