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).
reservekey.KeepKey();
            
            
            AddToWallet(wtxNew);
            
            for (const CTxIn& txin : wtxNew.tx->vin)
            {
                CWalletTx &coin = mapWallet.at(txin.prevout.hash);
                coin.BindWallet(this);
                NotifyTransactionChanged(this, coin.GetHash(), CT_UPDATED);
            }
        }
        
        
        CWalletTx& wtx = mapWallet.at(wtxNew.GetHash());
        if (fBroadcastTransactions)
        {
            
            if (!wtx.AcceptToMemoryPool(*locked_chain, state)) {
                WalletLogPrintf("CommitTransaction(): Transaction cannot be broadcast immediately, %s\n", FormatStateMessage(state));
                
            } else {
                wtx.RelayWalletTransaction(*locked_chain);
            }
        }
    }
    return true;
}
DBErrors CWallet::LoadWallet(bool& fFirstRunRet)