[1.0-beta1 -> main] P2P: Fix switch from lib catchup to head catchup #149
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When syncing do not mark a block as applied until it is actually applied to the chain state.
Reverting this commit: AntelopeIO/leap@fdeb7fc with the comment "GH-2125 If we have the block in our dispatcher list then it is applied". The comment is wrong. A block that is in the dispatcher list is not necessarily applied. We can not assume that a block is applied just because we have added it to our received block list. We distinguish from received blocks and applied blocks in
sync_manager
to know the current state of syncing. The indication that the block is already applied confusedsync_manager
so that it doesn't request the correct blocks.Introduced in AntelopeIO/leap#2290
Merges
release/1.0-beta1
intomain
including #146 & #147Resolves #141