From 7c4e4c7603d78439649d2095edc544bee4a7567b Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 12 Mar 2021 23:43:58 +0100 Subject: wallet_api: add isDeterministic() --- src/wallet/api/wallet.cpp | 5 +++++ src/wallet/api/wallet.h | 1 + src/wallet/api/wallet2_api.h | 6 ++++++ 3 files changed, 12 insertions(+) (limited to 'src/wallet') diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 4f923ce54..d06a11a64 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -2104,6 +2104,11 @@ bool WalletImpl::watchOnly() const return m_wallet->watch_only(); } +bool WalletImpl::isDeterministic() const +{ + return m_wallet->is_deterministic(); +} + void WalletImpl::clearStatus() const { boost::lock_guard l(m_statusMutex); diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index e501d3943..7442e2b7f 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -129,6 +129,7 @@ public: void setRecoveringFromDevice(bool recoveringFromDevice) override; void setSubaddressLookahead(uint32_t major, uint32_t minor) override; bool watchOnly() const override; + bool isDeterministic() const override; bool rescanSpent() override; NetworkType nettype() const override {return static_cast(m_wallet->nettype());} void hardForkInfo(uint8_t &version, uint64_t &earliest_height) const override; diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h index b40b6763f..8ef0ca94d 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -626,6 +626,12 @@ struct Wallet */ virtual bool watchOnly() const = 0; + /** + * @brief isDeterministic - checks if wallet keys are deterministic + * @return - true if deterministic + */ + virtual bool isDeterministic() const = 0; + /** * @brief blockChainHeight - returns current blockchain height * @return -- cgit v1.2.3