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); } } 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")