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

bubble up download event from engineHandler #10098

Closed
Tracked by #8742
mattsse opened this issue Aug 5, 2024 · 0 comments · Fixed by #10158
Closed
Tracked by #8742

bubble up download event from engineHandler #10098

mattsse opened this issue Aug 5, 2024 · 0 comments · Fixed by #10158

Comments

@mattsse
Copy link
Collaborator

mattsse commented Aug 5, 2024

we're currently ignoring events for new downloads

// advance the downloader
if let Poll::Ready(DownloadOutcome::Blocks(blocks)) = self.downloader.poll(cx) {
// delegate the downloaded blocks to the handler
self.handler.on_event(FromEngine::DownloadedBlocks(blocks));
continue
}

we can introduce a new event type that wraps:

type Event = T::Event;

and also has a variant for new download blocks event:

/// New download started.
NewDownloadStarted { remaining_blocks: u64, target: B256 },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant