wallet_api: expose offline mode status

This commit is contained in:
rating89us 2021-07-19 00:15:15 +02:00 committed by rating89us
parent de3456e127
commit a3d2b71ee9
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;