-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
op-node: prevent spamming of reqs for blocks triggered by `checkForGa…
…pInUnsafeQueue` (#10063) * Add rangeReqId so we can cancel all associated block req via single flag * Use crypto/rand instead of math/rand for randomReqId * Use atomic counter instead of random num for rangeReqId * Remove redundant peerRequest.complete field. Use inFlight instead * Add mutex to activeRangeRequests map * Do not penalize peer for block not found error * Fix inFlight request clean up logic * Add test checks for cancelled range request * Add mutex protection to inFlight map * Use constants for ResultCode * Simplify inFlight.get method logic * Use same struct for activeRangeRequests and inFlight
- Loading branch information
1 parent
0d221da
commit 589b1fd
Showing
3 changed files
with
139 additions
and
78 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
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
Oops, something went wrong.