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).
{
    WalletBatch batch(*database);
    batch.WriteBestBlock(loc);
}
void CWallet::SetMinVersion(enum WalletFeature nVersion, WalletBatch* batch_in, bool fExplicit)
{
    LOCK(cs_wallet);
    if (nWalletVersion >= nVersion)
        return;
    
    if (fExplicit && nVersion > nWalletMaxVersion)
            nVersion = FEATURE_LATEST;
    nWalletVersion = nVersion;
    if (nVersion > nWalletMaxVersion)
        nWalletMaxVersion = nVersion;
    {
        WalletBatch* batch = batch_in ? batch_in : new WalletBatch(*database);
        if (nWalletVersion > 40000)
            batch->WriteMinVersion(nWalletVersion);
        if (!batch_in)
            delete batch;
    }
}
bool CWallet::SetMaxVersion(int nVersion)