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

Avoid unnecessary state reset of allowed_requests when no block requests are sent #5774

Conversation

liuchengxu
Copy link
Contributor

This PR is cherry-picked from #5663 so that I can maintain a smaller polkadot-sdk diff downstream sooner than later.

cc @lexnv @dmitry-markin

…re sent

Previously, the state of `allowed_requests` will always be reset to the
default value even if there are no new block requests in the end. This
could cause an edge cause that `peer_block_request()` will early
return next time when no ongoing block requests in fact.
prdoc/pr_5774.prdoc Outdated Show resolved Hide resolved
Copy link
Contributor

@lexnv lexnv left a comment

Choose a reason for hiding this comment

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

LGTM! As always thanks for contributing 🙏

// cc @dmitry-markin would love to get your feedback on this thanks

Co-authored-by: Alexandru Vasile <[email protected]>
@dmitry-markin dmitry-markin added the T0-node This PR/Issue is related to the topic “node”. label Sep 20, 2024
Copy link
Contributor

@dmitry-markin dmitry-markin left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@dmitry-markin dmitry-markin added this pull request to the merge queue Sep 20, 2024
Merged via the queue into paritytech:master with commit 515fcc9 Sep 20, 2024
202 of 208 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants