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>towallet/wallettool.cppwhere theUSE_BDBmacro is used
This PR:
#include <wallet/wallet.h> from <wallet/wallettool.h><wallet/wallettool.h>#include <config/bitcoin-config.h> to wallet/wallettool.cpp where the USE_BDB macro is used<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
No conflicts as of last run.
Rebased 5fc7c3161e9d0d3ea7ca7a926fb09ddbd626cf32 -> 49b906c842676a79c16d5def7588ac7aefb72ad8 (pr23346.01 -> pr23346.02) due to the conflict with #23006.
ACK 49b906c. Verified that:
I’m curious to know why WalletShowInfo() was moved out of src/wallet/wallettool.h though.
I’m curious to know why
WalletShowInfo()was moved out ofsrc/wallet/wallettool.hthough.
It is used in the only compilation unit: https://github.com/bitcoin/bitcoin/blob/49b906c842676a79c16d5def7588ac7aefb72ad8/src/wallet/wallettool.cpp#L100
1 | @@ -2,20 +2,23 @@ 2 | // Distributed under the MIT software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | -#if defined(HAVE_CONFIG_H) 6 | -#include <config/bitcoin-config.h> 7 | -#endif 8 | -
This should be left in IMO.
Updated 49b906c842676a79c16d5def7588ac7aefb72ad8 -> 3431839c33fa3892c982322e4add39e28ddba719 (pr23346.02 -> pr23346.03, diff):
1 | @@ -2,6 +2,12 @@ 2 | // Distributed under the MIT software license, see the accompanying 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | 5 | +#if defined(HAVE_CONFIG_H) 6 | +#include <config/bitcoin-config.h> 7 | +#endif 8 | + 9 | +#include <wallet/wallettool.h>
doesn't matter here, but the self-include is always the very first one on its own section for us, I think