-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Discard child block with parent_hash not matching hash of imported block
Consider a root block `A`, old chain `-- B -- C` and new one `-- B' -- C'`. Due to asynchronous nature of realtime fetcher it is possible for block `B` to be imported _later_ than the entire chain `-- B' -- C'`. In this case we should discard block `C'` and let it be refetched. When that happens, block `B` gets discarded to make sure block `B'` gets eventually fetched and the chain becomes consistent.
- Loading branch information
Showing
2 changed files
with
20 additions
and
9 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
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