Skip to content

Commit dfe6580

Browse files
committed
Merge bitcoin/bitcoin#27759: Fix #includes in src/wallet
1f97572 Fix `#include`s in `src/wallet` (Hennadii Stepanov) Pull request description: This PR is a minimum required changes to fix bitcoin/bitcoin#27571 (comment). ACKs for top commit: MarcoFalke: lgtm ACK 1f97572 Tree-SHA512: de885210076d23f3394c42ca50e6ae2470c0ae6523399a2fa3ebb7c06383bdacef9c26166fa19747200396bed796c8772165e24416eb30ed8edd024e3394b2fe
2 parents 769dd1e + 1f97572 commit dfe6580

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
@@ -661,6 +664,18 @@ class DescriptorScriptPubKeyMan : public ScriptPubKeyMan
661664

662665
void UpgradeDescriptorCache();
663666
};
667+
668+
/** struct containing information needed for migrating legacy wallets to descriptor wallets */
669+
struct MigrationData
670+
{
671+
CExtKey master_key;
672+
std::vector<std::pair<std::string, int64_t>> watch_descs;
673+
std::vector<std::pair<std::string, int64_t>> solvable_descs;
674+
std::vector<std::unique_ptr<DescriptorScriptPubKeyMan>> desc_spkms;
675+
std::shared_ptr<CWallet> watchonly_wallet{nullptr};
676+
std::shared_ptr<CWallet> solvable_wallet{nullptr};
677+
};
678+
664679
} // namespace wallet
665680

666681
#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)