diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-04-16 12:51:22 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-04-16 12:51:22 -0500 |
commit | 13418dbb98df1cc8281f8cabeb9b9c9292ec7ff9 (patch) | |
tree | 9e77fb2260de5f81fe94baf707e3fa8b79033855 /src/wallet | |
parent | Merge pull request #7642 (diff) | |
parent | expose set_offline to wallet api (diff) | |
download | monero-13418dbb98df1cc8281f8cabeb9b9c9292ec7ff9.tar.xz |
Merge pull request #7648
25e8254 expose set_offline to wallet api (benevanoff)
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/api/wallet.cpp | 4 | ||||
-rw-r--r-- | src/wallet/api/wallet.h | 2 | ||||
-rw-r--r-- | src/wallet/api/wallet2_api.h | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 3bbd9ce0b..5d9eb7a14 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -2308,6 +2308,10 @@ bool WalletImpl::rescanSpent() return true; } +void WalletImpl::setOffline(bool offline) +{ + m_wallet->set_offline(offline); +} void WalletImpl::hardForkInfo(uint8_t &version, uint64_t &earliest_height) const { diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index 0f3614bb4..13b33d1cd 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -182,6 +182,8 @@ public: virtual bool setCacheAttribute(const std::string &key, const std::string &val) override; virtual std::string getCacheAttribute(const std::string &key) const override; + virtual void setOffline(bool offline) override; + virtual bool setUserNote(const std::string &txid, const std::string ¬e) override; virtual std::string getUserNote(const std::string &txid) const override; virtual std::string getTxKey(const std::string &txid) const override; diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h index b1cebedaf..320b458bd 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -1014,6 +1014,12 @@ struct Wallet * \return true on success */ virtual bool rescanSpent() = 0; + + /* + * \brief setOffline - toggle set offline on/off + * \param offline - true/false + */ + virtual void setOffline(bool offline) = 0; //! blackballs a set of outputs virtual bool blackballOutputs(const std::vector<std::string> &outputs, bool add) = 0; |