-
Notifications
You must be signed in to change notification settings - Fork 37.7k
util, refactor: Improve headers for bitcoin-wallet tool #23346
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
5fc7c31
to
49b906c
Compare
Rebased 5fc7c31 -> 49b906c (pr23346.01 -> pr23346.02) due to the conflict with #23006. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 49b906c. Verified that:
- #include <wallet/wallet.h> isn’t needed in src/wallet/wallettool.h
- All the newly added #include in the files are necessary.
I’m curious to know why WalletShowInfo()
was moved out of src/wallet/wallettool.h
though.
It is used in the only compilation unit: bitcoin/src/wallet/wallettool.cpp Line 100 in 49b906c
|
src/bitcoin-wallet.cpp
Outdated
#if defined(HAVE_CONFIG_H) | ||
#include <config/bitcoin-config.h> | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be left in IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
49b906c
to
3431839
Compare
Updated 49b906c -> 3431839 (pr23346.02 -> pr23346.03, diff): |
Lgtm, @achow101? |
#include <config/bitcoin-config.h> | ||
#endif | ||
|
||
#include <wallet/wallettool.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't matter here, but the self-include is always the very first one on its own section for us, I think
…et tool 3431839 util, refactor: Improve headers for bitcoin-wallet tool (Hennadii Stepanov) Pull request description: This PR: - removes unneeded `#include <wallet/wallet.h>` from `<wallet/wallettool.h>` - introduces class forward declaration in `<wallet/wallettool.h>` - added `#include <config/bitcoin-config.h>` to `wallet/wallettool.cpp` where the `USE_BDB` macro is used Top commit has no ACKs. Tree-SHA512: a0de560d821f8b570ae806a1165b9b382c9e0b339687d932052fa4c38ab2ba493e7e050f19adc02ad7db40c42cf88ac1d37209f9071494a0ab268ed33ff22b9f
…oin-wallet tool d99b3a7 util, refactor: Improve headers for bitcoin-wallet tool (Hennadii Stepanov) Pull request description: This PR: - removes unneeded `#include <wallet/wallet.h>` from `<wallet/wallettool.h>` - introduces class forward declaration in `<wallet/wallettool.h>` - added `#include <config/bitcoin-config.h>` to `wallet/wallettool.cpp` where the `USE_BDB` macro is used Top commit has no ACKs. Tree-SHA512: a0de560d821f8b570ae806a1165b9b382c9e0b339687d932052fa4c38ab2ba493e7e050f19adc02ad7db40c42cf88ac1d37209f9071494a0ab268ed33ff22b9f
This PR:
#include <wallet/wallet.h>
from<wallet/wallettool.h>
<wallet/wallettool.h>
#include <config/bitcoin-config.h>
towallet/wallettool.cpp
where theUSE_BDB
macro is used