Skip to content

Commit

Permalink
Update prdoc/pr_5774.prdoc
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandru Vasile <[email protected]>
  • Loading branch information
liuchengxu and lexnv authored Sep 19, 2024
1 parent 65d9c4f commit 7088a4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prdoc/pr_5774.prdoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: Avoid unnecessary state reset of allowed_requests when no block requests
doc:
- audience: Node Dev
description: |
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.
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:
Expand Down

0 comments on commit 7088a4d

Please sign in to comment.