-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
p2p: Reduce number of goroutines in CFiltersV2()
This refactors the CFiltersV2 function to reduce the number of goroutines used, therefore slightly reducing total cpu and memory load and making it easier to run the race detector and debug issues. The number of goroutines is reduced from one per block hash in the request to two per call. This is done by refactoring the code to use one goroutine to send all requests and one to read the responses, while ensuring that the requests are still sent as fast as the network stack will allow it.
- Loading branch information
Showing
1 changed file
with
100 additions
and
19 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