-
Notifications
You must be signed in to change notification settings - Fork 690
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid unnecessary state reset of
allowed_requests
when no block req…
…uests are sent (#5774) 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 --------- Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by: Dmitry Markin <dmitry@markin.tech>
- Loading branch information
1 parent
5a43147
commit 515fcc9
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
title: Avoid unnecessary state reset of allowed_requests when no block requests are sent | ||
|
||
doc: | ||
- audience: Node Dev | ||
description: | | ||
Previously, the state of `allowed_requests` was always reset to the default | ||
even if there were no new block requests. This could cause an edge case | ||
because `peer_block_request()` will return early next time when there are no ongoing block requests. | ||
This patch fixes it by checking whether block requests are empty before updating the state. | ||
|
||
crates: | ||
- name: sc-network-sync | ||
bump: patch |
This file contains 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