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 generic BlockStateNotificationStream type for pending, safe, finalized watchers #10249

Merged
merged 1 commit into from
Aug 10, 2024

Conversation

jenpaff
Copy link
Collaborator

@jenpaff jenpaff commented Aug 10, 2024

Closes #10204

Usage Examples:

let pending_state = BlockState::new(pending_block);
let (_, rx) = watch::channel(Some(pending_state));
let mut stream = BlockStateNotificationStream::<BlockState>::new(rx);

let finalized_state = SealedHeader::new(Header::default(), hash);
let (_, rx) = watch::channel(Some(finalized_state));
let mut stream = BlockStateNotificationStream::<SealedHeader>::new(rx);

@github-actions github-actions bot added the C-enhancement New feature or request label Aug 10, 2024
@jenpaff jenpaff marked this pull request as ready for review August 10, 2024 09:07
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean

this will be useful combined with #10231

@mattsse mattsse added this pull request to the merge queue Aug 10, 2024
Merged via the queue into main with commit cdf5d8e Aug 10, 2024
35 checks passed
@mattsse mattsse deleted the jenpaff/add-stream-type-for-pending-block branch August 10, 2024 14:16
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
None yet
Development

Successfully merging this pull request may close these issues.

Add Stream type for the pending block
2 participants