Skip to content

Commit 1f97572

Browse files
committed
Fix #includes in src/wallet
1 parent 25202ca commit 1f97572

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

ci/test/06_script_b.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,8 @@ if [ "${RUN_TIDY}" = "true" ]; then
155155
# accepted in src/.bear-tidy-config
156156
# Filter out:
157157
# * qt qrc and moc generated files
158-
# * walletutil (temporarily)
159158
# * secp256k1
160-
jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$|src/wallet/walletutil|src/secp256k1/src/") | not))' ../compile_commands.json > tmp.json
159+
jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$|src/secp256k1/src/") | not))' ../compile_commands.json > tmp.json
161160
mv tmp.json ../compile_commands.json
162161
cd "${BASE_BUILD_DIR}/bitcoin-$HOST/"
163162
python3 "${DIR_IWYU}/include-what-you-use/iwyu_tool.py" \

src/wallet/scriptpubkeyman.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#ifndef BITCOIN_WALLET_SCRIPTPUBKEYMAN_H
66
#define BITCOIN_WALLET_SCRIPTPUBKEYMAN_H
77

8+
#include <logging.h>
89
#include <psbt.h>
910
#include <script/descriptor.h>
1011
#include <script/signingprovider.h>
@@ -27,6 +28,8 @@ enum class OutputType;
2728
struct bilingual_str;
2829

2930
namespace wallet {
31+
struct MigrationData;
32+
3033
// Wallet storage things that ScriptPubKeyMans need in order to be able to store things to the wallet database.
3134
// It provides access to things that are part of the entire wallet and not specific to a ScriptPubKeyMan such as
3235
// wallet flags, wallet version, encryption keys, encryption status, and the database itself. This allows a
@@ -658,6 +661,18 @@ class DescriptorScriptPubKeyMan : public ScriptPubKeyMan
658661

659662
void UpgradeDescriptorCache();
660663
};
664+
665+
/** struct containing information needed for migrating legacy wallets to descriptor wallets */
666+
struct MigrationData
667+
{
668+
CExtKey master_key;
669+
std::vector<std::pair<std::string, int64_t>> watch_descs;
670+
std::vector<std::pair<std::string, int64_t>> solvable_descs;
671+
std::vector<std::unique_ptr<DescriptorScriptPubKeyMan>> desc_spkms;
672+
std::shared_ptr<CWallet> watchonly_wallet{nullptr};
673+
std::shared_ptr<CWallet> solvable_wallet{nullptr};
674+
};
675+
661676
} // namespace wallet
662677

663678
#endif // BITCOIN_WALLET_SCRIPTPUBKEYMAN_H

src/wallet/wallet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <wallet/context.h>
4343
#include <wallet/external_signer_scriptpubkeyman.h>
4444
#include <wallet/fees.h>
45+
#include <wallet/scriptpubkeyman.h>
4546

4647
#include <univalue.h>
4748

src/wallet/walletutil.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,6 @@ class WalletDescriptor
104104
WalletDescriptor() {}
105105
WalletDescriptor(std::shared_ptr<Descriptor> descriptor, uint64_t creation_time, int32_t range_start, int32_t range_end, int32_t next_index) : descriptor(descriptor), creation_time(creation_time), range_start(range_start), range_end(range_end), next_index(next_index) {}
106106
};
107-
108-
class CWallet;
109-
class DescriptorScriptPubKeyMan;
110-
111-
/** struct containing information needed for migrating legacy wallets to descriptor wallets */
112-
struct MigrationData
113-
{
114-
CExtKey master_key;
115-
std::vector<std::pair<std::string, int64_t>> watch_descs;
116-
std::vector<std::pair<std::string, int64_t>> solvable_descs;
117-
std::vector<std::unique_ptr<DescriptorScriptPubKeyMan>> desc_spkms;
118-
std::shared_ptr<CWallet> watchonly_wallet{nullptr};
119-
std::shared_ptr<CWallet> solvable_wallet{nullptr};
120-
};
121107
} // namespace wallet
122108

123109
#endif // BITCOIN_WALLET_WALLETUTIL_H

0 commit comments

Comments
 (0)