-
Notifications
You must be signed in to change notification settings - Fork 38.7k
refactor: move GetServicesNames from rpc/util.{h,cpp} to rpc/net.cpp #28136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: move GetServicesNames from rpc/util.{h,cpp} to rpc/net.cpp #28136
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
1cff4e1 to
41e8e19
Compare
|
Re the new CI failure, seems an update on master now causes a build error here. Updating. |
as it is only called from that compilation unit. This avoids needlessly compiling GetServicesNames() in the 35 other files that include rpc/util.h.
41e8e19 to
2607936
Compare
as it was only needed for GetServicesNames(). This potentially avoids needlessly compiling the 500 lines of protocol.h in the 35 files other than rpc/net.cpp that include rpc/util.h. Drop an unneeded CPubKey forward declaration. The other IWYU suggestions would require more extensive changes in other files. Add 3 already-missing include headers in other translation units that are needed to compile without protocol.h in rpc/util.h, as it includes netaddress.h, which in turn includes util/strencodings.h.
2607936 to
bbb68ff
Compare
|
Rebased and updated. The Win64 CI error is unrelated and documented in issue #28491. |
|
lgtm ACK bbb68ff |
|
All unit and functional tests passed locally on my Linux system. ACK bbb68ff |
|
ACK bbb68ff |
Move
GetServicesNames()fromrpc/utiltorpc/net.cpp, as it is only called from that compilation unit and there is no reason for other ones to need it.Remove the
protocol.hinclude inrpc/util.h, as it was only needed forGetServicesNames(), drop an unneeded forward declaration (the other IWYU suggestions would require more extensive changes in other files), and add 3 already-missing include headers in other translation units that are needed to compile withoutprotocol.hinrpc/util.h, asprotocol.hincludesnetaddress.h, which in turn includesutil/strencodings.h.