Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netsync: Re-request data sooner after peer disconnect #3067

Merged
merged 1 commit into from
Mar 8, 2023

Conversation

jrick
Copy link
Member

@jrick jrick commented Mar 1, 2023

This change speeds up the relay of blocks and transactions when the peer we have queried for this data disconnects. If any other peers have also announced this data, request the data again immediately from them instead of waiting for a slower peer to announce the data again through an inventory message.

Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads well. I'll do some testing on it before approving.

Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some testing on this and noticed it uncovered a bug with the known inventory code. I'll resolve that issue in a separate PR, but this one works properly once that issue is resolved.

EDIT: For reference, the aforementioned issue is resolved by #3074.

Please squash it to a single commit and I'll approve and get it merged.

This change speeds up the relay of blocks and transactions when the
peer we have queried for this data disconnects.  If any other peers
have also announced this data, request the data again immediately from
them instead of waiting for a slower peer to announce the data again
through an inventory message.
@davecgh davecgh merged commit 1510b02 into decred:master Mar 8, 2023
@jrick jrick deleted the fast_rerequest branch March 8, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants