diff options
author | rating89us <45968869+rating89us@users.noreply.github.com> | 2021-07-19 00:15:15 +0200 |
---|---|---|
committer | rating89us <rating89us@rating89us.com> | 2021-07-19 00:30:36 +0200 |
commit | a3d2b71ee98905f96a12e312a769c8614dcba0bf (patch) | |
tree | 43e211b11f67ae6b5acd3d40715d17c84042f27e /src/wallet | |
parent | Merge pull request #7764 (diff) | |
download | monero-a3d2b71ee98905f96a12e312a769c8614dcba0bf.tar.xz |
wallet_api: expose offline mode status
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/api/wallet.cpp | 5 | ||||
-rw-r--r-- | src/wallet/api/wallet.h | 1 | ||||
-rw-r--r-- | src/wallet/api/wallet2_api.h | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index b4fa1ea8c..3a2074cc4 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -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); diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index 217f16e48..011a94ec4 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -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 ¬e) override; virtual std::string getUserNote(const std::string &txid) const override; diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h index a08033033..ed8c55d3b 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -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; |