In bdd42ed8de8a92ae3e69e7b2dfceae7330f32676: I think it can be simplified. See:
diff --git a/test/functional/wallet_migration.py b/test/functional/wallet_migration.py
index 928ab4acb4..06bc4e1fbb 100755
--- a/test/functional/wallet_migration.py
+++ b/test/functional/wallet_migration.py
@@ -1070,12 +1070,7 @@ class WalletMigrationTest(BitcoinTestFramework):
wpkh_desc = descsum_create(f'wpkh({pubkey_hex})')
expected_descs = [pk_desc, pkh_desc, sh_wpkh_desc, wpkh_desc]
- migrated_desc = []
- for desc_info in wo_wallet.listdescriptors()['descriptors']:
- desc = desc_info['desc']
- if pubkey.hex() in desc:
- migrated_desc.append(desc)
-
+ migrated_desc = [item['desc'] for item in wo_wallet.listdescriptors()['descriptors']]
# Verify all expected descriptors were migrated
assert_equal(expected_descs, migrated_desc)
wallet.unloadwallet()
I don't see why we need to check if pubkey is into the descriptors, we expect all of them to have it.