Merge pull request #7802

a3d2b71 wallet_api: expose offline mode status (rating89us)
This commit is contained in:
luigi1111 2021-08-11 22:33:38 -04:00
commit cb08466394
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
3 changed files with 7 additions and 0 deletions

View File

@ -2392,6 +2392,11 @@ void WalletImpl::setOffline(bool offline)
m_wallet->set_offline(offline);
}
bool WalletImpl::isOffline() const
{
return m_wallet->is_offline();
}
void WalletImpl::hardForkInfo(uint8_t &version, uint64_t &earliest_height) const
{
m_wallet->get_hard_fork_info(version, earliest_height);

View File

@ -186,6 +186,7 @@ public:
virtual std::string getCacheAttribute(const std::string &key) const override;
virtual void setOffline(bool offline) override;
virtual bool isOffline() const override;
virtual bool setUserNote(const std::string &txid, const std::string &note) override;
virtual std::string getUserNote(const std::string &txid) const override;

View File

@ -1034,6 +1034,7 @@ struct Wallet
* \param offline - true/false
*/
virtual void setOffline(bool offline) = 0;
virtual bool isOffline() const = 0;
//! blackballs a set of outputs
virtual bool blackballOutputs(const std::vector<std::string> &outputs, bool add) = 0;