This would allow wallet operations like funding transactions with smart contract-based inputs such as LN, or any input the Core wallet doesn't know how to sign for.

https://github.com/bitcoin/bitcoin/pull/17211#issuecomment-933674310
{
    AssertLockHeld(cs_);
    std::map<uint256, CWaetTx>::const_iterator it = mapWaet.find(hash);
    if (it == mapWaet.end())
        return nuptr;
    return &(it->second);
}
void CWaet::UpgradeKeyMetadata()