[5.0] P2P: Fix: Throttling of last block of request caused lost block#1791
Merged
heifner merged 1 commit intorelease/5.0from Oct 18, 2023
Merged
[5.0] P2P: Fix: Throttling of last block of request caused lost block#1791heifner merged 1 commit intorelease/5.0from
heifner merged 1 commit intorelease/5.0from
Conversation
…g the last block and not sending it later
greg7mdp
approved these changes
Oct 17, 2023
Contributor
greg7mdp
left a comment
There was a problem hiding this comment.
I think I'd get rid of num, and use cc.fetch_block_by_number( peer_requested->last + 1 ); and peer_requested->last below, but it is a matter of preference.
linh2931
approved these changes
Oct 17, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 throttling was enabled on a connection, the
net_pluginwould assume the last block of apeer_requestedwas sent and reset thepeer_requestedindicating no other sync blocks need to be sent to the peer. This caused the block to not be sent or rescheduled to be sent later resulting in the peer not receiving the block. The peer would have to wait for a full timeout before requesting the required block from a different peer.Resolves #1776