The new `getrpcinfo` shows a list of the active commands and the duration each command has been running. This sounds like a good place to report a completion percentage for any command doing a blockchain rescan, to solve [this problem](https://bitcoin.stackexchange.com/q/83236/90721).
{
    if (!CanGetAddresses(internal)) {
        return false;
    }
    CKeyPool keypool;
    {
        LOCK(cs_wallet);
        int64_t nIndex;
        if (!ReserveKeyFromKeyPool(nIndex, keypool, internal) && !IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
            if (IsLocked()) return false;
            WalletBatch batch(*database);
            result = GenerateNewKey(batch, internal);
            return true;
        }
        KeepKey(nIndex);
        result = keypool.vchPubKey;
    }
    return true;
}
static int64_t GetOldestKeyTimeInPool(const std::set<int64_t>& setKeyPool, WalletBatch& batch) {