diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 0d3f1c4714..0aa0cb55f5 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -5069,6 +5069,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); } } diff --git a/test/functional/wallet_migration.py b/test/functional/wallet_migration.py index c37bb8d3df..0815b9616c 100755 --- a/test/functional/wallet_migration.py +++ b/test/functional/wallet_migration.py @@ -890,7 +890,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")