Skip to content

Commit

Permalink
fix: correctly poll BasicBlockDownloader (#11981)
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr authored Oct 22, 2024
1 parent d68dca1 commit 74eb375
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/engine/tree/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ where
}

// 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));
if let Poll::Ready(outcome) = self.downloader.poll(cx) {
if let DownloadOutcome::Blocks(blocks) = outcome {
// delegate the downloaded blocks to the handler
self.handler.on_event(FromEngine::DownloadedBlocks(blocks));
}
continue
}

Expand Down

0 comments on commit 74eb375

Please sign in to comment.