Merge pull request #7648

25e8254 expose set_offline to wallet api (benevanoff)
This commit is contained in:
luigi1111 2021-04-16 12:51:22 -05:00
commit 13418dbb98
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
3 changed files with 12 additions and 0 deletions

View file

@ -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
{

View file

@ -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 &note) override;
virtual std::string getUserNote(const std::string &txid) const override;
virtual std::string getTxKey(const std::string &txid) const override;

View file

@ -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;