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).
: m_chain(chain),
          m_location(location),
          database(std::move(database))
    {
    }
    ~CWallet()
    {
        
        assert(NotifyUnload.empty());
        delete encrypted_batch;
        encrypted_batch = nullptr;
    }
    std::map<uint256, CWalletTx> mapWallet GUARDED_BY(cs_wallet);
    typedef std::multimap<int64_t, CWalletTx*> TxItems;
    TxItems wtxOrdered;
    int64_t nOrderPosNext GUARDED_BY(cs_wallet) = 0;
    uint64_t nAccountingEntryNumber = 0;
    std::map<CTxDestination, CAddressBookData> mapAddressBook GUARDED_BY(cs_wallet);
    std::set<COutPoint> setLockedCoins GUARDED_BY(cs_wallet);
    
    std::unique_ptr<interfaces::Handler> m_chain_notifications_handler;
    
    void handleNotifications();
    
    interfaces::Chain& chain() const { assert(m_chain); return *m_chain; }