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).
{
    LOCK(cs_wallet);
    WalletBatch batch(*database, "r+", fFlushOnClose);
    uint256 hash = wtxIn.GetHash();
    
    std::pair<std::map<uint256, CWalletTx>::iterator, bool> ret = mapWallet.insert(std::make_pair(hash, wtxIn));
    CWalletTx& wtx = (*ret.first).second;
    wtx.BindWallet(this);
    bool fInsertedNew = ret.second;
    if (fInsertedNew) {
        wtx.nTimeReceived = chain().getAdjustedTime();
        wtx.nOrderPos = IncOrderPosNext(&batch);