diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2024-02-02 14:33:44 -0500 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2024-02-02 14:33:53 -0500 |
commit | 93e10cab5d4c9964fff5570661d84d39622bab28 (patch) | |
tree | 51f0e4d95a3cd7c8674d6c3afcdf710f7ed47d56 /src | |
parent | 38941045c5911111628567c41dc86037b046af13 (diff) | |
parent | 3904123da954f9ebd905de4129aec9f9bab9efc7 (diff) |
Merge bitcoin/bitcoin#29367: wallet: Set descriptors flag after migrating blank wallets
3904123da954f9ebd905de4129aec9f9bab9efc7 tests: Test that descriptors flag is set for migrated blank wallets (Ava Chow)
072d506240f6c39387b2edd4421818cc914c0912 wallet: Make sure that the descriptors flag is set for blank wallets (Ava Chow)
Pull request description:
While rebasing #28710 after #28976 was merged, I realized that although blank wallets were being moved to sqlite, `WALLET_FLAG_DESCRIPTORS` was not being set so those blank wallets would still continue to be treated as legacy wallets.
To fix that, just set the descriptor flags for blank wallets. Also added a test to catch this.
ACKs for top commit:
epiccurious:
Tested ACK 3904123da954f9ebd905de4129aec9f9bab9efc7.
delta1:
tested ACK 3904123da954f9ebd905de4129aec9f9bab9efc7
ryanofsky:
Code review ACK 3904123da954f9ebd905de4129aec9f9bab9efc7
murchandamus:
code review ACK 3904123da954f9ebd905de4129aec9f9bab9efc7
Tree-SHA512: 9f6fe9c1899ca387ab909b1bb6956cd6bc5acbf941686ddc6c061f9b1ceec2cc9d009ff472486fc86e963f6068f0e2f1ae96282e7c630193797a9734c4f424ab
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 33b3ad6e91..1946e43eac 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4257,6 +4257,9 @@ util::Result<MigrationResult> MigrateLegacyToDescriptor(const std::string& walle success = local_wallet->IsWalletFlagSet(WALLET_FLAG_BLANK_WALLET); if (!success) { success = DoMigration(*local_wallet, context, error, res); + } else { + // Make sure that descriptors flag is actually set + local_wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS); } } |