Newly created wallets will always have an upgraded descriptor cache, so set those.
Also, to verify this behavior, add a new flags
field to getwalletinfo
and check that in the functional tests.
Split from #32489
Although WalletBatch::LoadWallet performs the descriptor cache upgrade,
because new wallets do not have the descriptor flag set yet, the upgrade
does not run and set the flag.
Since new wallets will always being using the upgraded cache, there's no
reason to wait to set the flag, so set it when the wallet flags are
being initialized for new wallets.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32597.
See the guideline for information on the review process. A summary of reviews will appear here.