P2P: Send handshake to peer to let it know it is not syncing from us #18
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:
nodeos_forked_chain_if_lr_test
https://github.com/AntelopeIO/spring/actions/runs/8624067947/job/23638727644The logs showed the test failed because a peer (Node02) stopped receiving blocks. It stopped receiving blocks because the block producer (Node00) thought Node02 was syncing from it, so it didn't send current blocks.
Updated
net_plugin
to send handshakes (how a node knows a peer is not syncing from it) even if the peer thinks the other peer is syncing from the you. Also send handshake to peer when it informs you that it needs blocks, but you determine it does not.Set
peer_syncing_from_us
to false for handshake case where it was missing (Block discrepancy is within network latency range).