From 072d506240f6c39387b2edd4421818cc914c0912 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 1 Feb 2024 18:00:58 -0500 Subject: [PATCH 1/2] wallet: Make sure that the descriptors flag is set for blank wallets --- src/wallet/wallet.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 33b3ad6e916..1946e43eac4 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4257,6 +4257,9 @@ util::Result 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); } } From 3904123da954f9ebd905de4129aec9f9bab9efc7 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 1 Feb 2024 18:01:34 -0500 Subject: [PATCH 2/2] tests: Test that descriptors flag is set for migrated blank wallets --- test/functional/wallet_migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/wallet_migration.py b/test/functional/wallet_migration.py index 20e92dbef73..b466d3c5452 100755 --- a/test/functional/wallet_migration.py +++ b/test/functional/wallet_migration.py @@ -881,7 +881,7 @@ class WalletMigrationTest(BitcoinTestFramework): assert_equal(wallet.getwalletinfo()["blank"], True) wallet.migratewallet() assert_equal(wallet.getwalletinfo()["blank"], True) - + assert_equal(wallet.getwalletinfo()["descriptors"], True) def test_avoidreuse(self): self.log.info("Test that avoidreuse persists after migration")