Right now to recover from a backup with an encrypted HD wallet the user must do something like unlock the wallet with a really long time out and manually trigger a rescan,  otherwise they risk missing some keys when auto-topup cannot run.
{
        AssertLockHeld(cs_wallet);
        assert(m_last_block_processed_height >= 0);
        return m_last_block_processed;
    }
    
    void SetLastBlockProcessed(int block_height, uint256 block_hash) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
    {
        AssertLockHeld(cs_wallet);
        m_last_block_processed_height = block_height;
        m_last_block_processed = block_hash;
    };
    
    void ConnectScriptPubKeyManNotifiers();
    
    void LoadDescriptorScriptPubKeyMan(uint256 id, WalletDescriptor& desc);
    
    
    
    
    void AddActiveScriptPubKeyMan(uint256 id, OutputType type, bool internal);
    
    
    
    
    void LoadActiveScriptPubKeyMan(uint256 id, OutputType type, bool internal);