[1.0-beta1 -> main] P2P: Fix stuck in peer syncing state #152
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.
Test failure: https://github.com/AntelopeIO/spring/actions/runs/9114438126/job/25059003107?pr=149
The producing node (Node03) was stuck in LIB catchup. Since blocks can be processed inside controller during a fork and not call
sync_master->sync_recv_block
withblk_applied==true
.This is similar to the issue addressed in #27. In the #27, a handshake with the wrong information was sent. In this case no handshake was sent at all as it become synced up during a fork switch. I believe this issue was masked by #147 because it was incorrectly reporting blocks as applied. Without this improper reporting of applied blocks a fork switch that applies up to synced would not call
sync_master->sync_recv_block
withblk_applied==true
and not move node out of LIB catchup.Now also send out handshakes if we determine we are synced and there is a pending handshake to send.
Related to #27
Related to #147
Merges
release/1.0-beta1
intomain
including #151Resolves #150