-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eth/fetcher: don't skip block/header when parent is not found
Currently, we simply skip importing block/header when parent block/header is not found. However, since multiple blocks can be imported in parallel, the not found parent might be due to the fact that the parent import does not finish yet. This leads to a suitation that the correct block in canonical chain is skipped and the node gets stuck until the peer timeout. We observe this behavior when there are reorgs and block import is time consuming. This commit fixes it by creating a new queue for those missing parent blocks and re-import them after the parent is imported.
- Loading branch information
Showing
1 changed file
with
105 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters