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

[Feature] Improve Chainpoller stream impl #1053

Open
mattsse opened this issue Jul 15, 2024 · 0 comments · May be fixed by #1061
Open

[Feature] Improve Chainpoller stream impl #1053

mattsse opened this issue Jul 15, 2024 · 0 comments · May be fixed by #1061
Labels
enhancement New feature or request

Comments

@mattsse
Copy link
Member

mattsse commented Jul 15, 2024

Component

rpc

Describe the feature you would like

ref #1052

this stream loop is a bit weird, because this listens for new heads and then fetches the missing range in full, using a cache to store to tmp store the full block:

pub(crate) fn into_stream(mut self) -> impl Stream<Item = Block> + 'static {
stream! {
let mut poll_task = self.poll_task.spawn().into_stream_raw();
'task: loop {

fetching the blocks can also be done sequentially and we should yield the next block immediately, like a FuturesOrdered or similar

cc @popzxc

Additional context

No response

@mattsse mattsse added the enhancement New feature or request label Jul 15, 2024
@popzxc popzxc linked a pull request Jul 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant