The help tells me I should unlock my encrypted wallet:

```
> help migratewallet

...
Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.
```

But when I do so and attempt to migrate the wallet I'm told that I've entered my password for needlessly:

```
> migratewallet

Error: migratewallet on encrypted wallets is currently unsupported.
```

<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

v24.0.1

size_t CWalletKeypoolCountExternalKeys() const
{
    AssertLockHeld(cs_);
    auto legacy_spk_man = GetLegacyScriptPubKeyMan();
    if (legacy_spk_man) {
        return legacy_spk_man->KeypoolCountExternalKeys();
    }
    unsigned int count = 0;
    for (auto spk_man  m_external_spk_managers) {
        count += spk_man.second->GetKeyPoolSize();
    }
    return count;
}
unsigned int CWalletGetKeyPoolSize() const
{
    AssertLockHeld(cs_);
    unsigned int count = 0;
    for (auto spk_man  GetActiveScriptPubKeyMans()) {
        count += spk_man->GetKeyPoolSize();
    }
    return count;
}
bool CWalletTopUpKeyPool(unsigned int kpSize)
{
    LOCK(cs_);
    bool res = true;
    for (auto spk_man  GetActiveScriptPubKeyMans()) {
        res &= spk_man->TopUp(kpSize);
    }
    return res;