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.
LogPrintf(("%s " + fmt).c_str(), GetDisplayName(), parameters...);
    };
    
    bool UpgradeWallet(int version, bilingual_str& error);
    
    std::set<ScriptPubKeyMan*> GetActiveScriptPubKeyMans() const;
    
    std::set<ScriptPubKeyMan*> GetAllScriptPubKeyMans() const;
    
    ScriptPubKeyMan* GetScriptPubKeyMan(const OutputType& type, bool internal) const;
    
    std::set<ScriptPubKeyMan*> GetScriptPubKeyMans(const CScript& script) const;
    
    ScriptPubKeyMan* GetScriptPubKeyMan(const uint256& id) const;
    
    std::unique_ptr<SigningProvider> GetSolvingProvider(const CScript& script) const;
    std::unique_ptr<SigningProvider> GetSolvingProvider(const CScript& script, SignatureData& sigdata) const;
    
    std::vector<WalletDescriptor> GetWalletDescriptors(const CScript& script) const;
    
    LegacyScriptPubKeyMan* GetLegacyScriptPubKeyMan() const;
    LegacyScriptPubKeyMan* GetOrCreateLegacyScriptPubKeyMan();
    
    void SetupLegacyScriptPubKeyMan();
    const CKeyingMaterial& GetEncryptionKey() const override;
    bool HasEncryptionKeys() const override;
    
    int GetLastBlockHeight() const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)