Skip to content

Commit 7ce8d74

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#23346: util, refactor: Improve headers for bitcoin-wallet 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
2 parents 7908772 + 3431839 commit 7ce8d74

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

src/bitcoin-wallet.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,21 @@
88

99
#include <chainparams.h>
1010
#include <chainparamsbase.h>
11+
#include <clientversion.h>
1112
#include <interfaces/init.h>
13+
#include <key.h>
1214
#include <logging.h>
15+
#include <pubkey.h>
16+
#include <tinyformat.h>
1317
#include <util/system.h>
1418
#include <util/translation.h>
1519
#include <util/url.h>
1620
#include <wallet/wallettool.h>
1721

22+
#include <exception>
1823
#include <functional>
24+
#include <string>
25+
#include <tuple>
1926

2027
const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
2128
UrlDecodeFn* const URL_DECODE = nullptr;

src/wallet/wallettool.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5+
#if defined(HAVE_CONFIG_H)
6+
#include <config/bitcoin-config.h>
7+
#endif
8+
9+
#include <wallet/wallettool.h>
10+
511
#include <fs.h>
612
#include <util/system.h>
713
#include <util/translation.h>

src/wallet/wallettool.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
#ifndef BITCOIN_WALLET_WALLETTOOL_H
66
#define BITCOIN_WALLET_WALLETTOOL_H
77

8-
#include <wallet/wallet.h>
8+
#include <string>
9+
10+
class ArgsManager;
911

1012
namespace WalletTool {
1113

12-
void WalletShowInfo(CWallet* wallet_instance);
1314
bool ExecuteWalletToolFunc(const ArgsManager& args, const std::string& command);
1415

1516
} // namespace WalletTool

0 commit comments

Comments
 (0)