🟡 Minor
Match Taproot keys by x-only identity (src/wallet/imports.cpp:149, head)
For a 32-byte Taproot key, descriptor parsing represents the x-only key with its even-parity CPubKey. A wallet may store the corresponding private key under the odd-parity CPubKey, causing this full-key lookup to miss it even though the descriptor’s x-only private-key lookup accepts either parity. The key is then omitted from keys, and importing a descriptor such as tr(<x-only-key>) is rejected as lacking private keys. Resolve x-only expressions by x-only identity across both parities, while retaining exact matching for full public keys.
💡 Suggestion
Pass known extended keys by const reference (src/script/descriptor.h:216, head)
SubstituteMasterExtPubs only reads xprvs, but its by-value parameter copies the entire map on every call; the import loop calls it for each parsed descriptor expansion. With many known extended keys or multipath expansions, this causes avoidable map-node and private-key copies and allocations while the import holds wallet locks. Accepting const std::map<CExtPubKey, CExtKey>& and updating the implementation and override preserves behavior while avoiding those copies.
Review coverage was incomplete. The adversarial review had incomplete evidence. The design review did not complete.