This repository was archived by the owner on Nov 6, 2020. It is now read-only.
refactor(fetch) : light use only one DNS thread#9647
Merged
Conversation
ascjones
reviewed
Sep 26, 2018
| }; | ||
|
|
||
| let handle = core.handle(); | ||
| let number_dns_threads = if is_light { 1 } else { 4 }; |
Contributor
There was a problem hiding this comment.
Instead of passing the flag down you could pass the number of threads as a parameter.
Collaborator
Author
There was a problem hiding this comment.
That's better, will change it!
|
|
||
| // fetch service | ||
| let fetch = fetch::Client::new().map_err(|e| format!("Error starting fetch client: {:?}", e))?; | ||
| let fetch = fetch::Client::new(cmd.light).map_err(|e| format!("Error starting fetch client: {:?}", e))?; |
Contributor
There was a problem hiding this comment.
This will always be true so could just pass in 1 here
|
|
||
| // fetch service | ||
| let fetch = fetch::Client::new().map_err(|e| format!("Error starting fetch client: {:?}", e))?; | ||
| let fetch = fetch::Client::new(cmd.light).map_err(|e| format!("Error starting fetch client: {:?}", e))?; |
Contributor
There was a problem hiding this comment.
This will always be false so could just pass in 4 here
2bb4b46 to
ac3e528
Compare
ordian
approved these changes
Sep 27, 2018
tomusdrw
approved these changes
Sep 27, 2018
| const VERIFY_PASSWORD_HINT: &str = "Make sure valid password is present in files passed using `--password` or in the configuration file."; | ||
|
|
||
| // Full client number of DNS threads | ||
| const FETCH_FULL_NUM_DNS_THREADS: usize = 4; |
Collaborator
There was a problem hiding this comment.
I doubt we actually need all 4 for the full node either. But fine with keeping it the same for backward compatibility.
dvdplm
added a commit
that referenced
this pull request
Oct 2, 2018
…mon-deps * origin/master: CI: Remove unnecessary pipes (#9681) test.sh: use cargo --target for platforms other than linux, win or mac (#9650) ci: fix push script (#9679) Hardfork the testnets (#9562) Calculate sha3 instead of sha256 for push-release. (#9673) ethcore-io retries failed work steal (#9651) fix(light_fetch): avoid race with BlockNumber::Latest (#9665) Test fix for windows cache name... (#9658) refactor(fetch) : light use only one `DNS` thread (#9647)
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempt to close #9623