aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-10-21 22:57:42 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-10-21 22:57:42 -0500
commit8b3b106ad1bc32b81a3ef74e789844d9f671f709 (patch)
tree9d0dc24fe2011d99b99f30aad0b6500d60541acf /src
parentMerge pull request #6852 (diff)
parentwallet2_api: implement stop() to interrupt refresh() loop once (diff)
downloadmonero-8b3b106ad1bc32b81a3ef74e789844d9f671f709.tar.xz
Merge pull request #6902
70eb0d1 wallet2_api: implement stop() to interrupt refresh() loop once (xiphon)
Diffstat (limited to 'src')
-rw-r--r--src/wallet/api/wallet.cpp5
-rw-r--r--src/wallet/api/wallet.h1
-rw-r--r--src/wallet/api/wallet2_api.h5
3 files changed, 11 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 152a7dcd7..9acc8484c 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -910,6 +910,11 @@ std::string WalletImpl::path() const
return m_wallet->path();
}
+void WalletImpl::stop()
+{
+ m_wallet->stop();
+}
+
bool WalletImpl::store(const std::string &path)
{
clearStatus();
diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h
index caf1e9ed4..3bf3e759b 100644
--- a/src/wallet/api/wallet.h
+++ b/src/wallet/api/wallet.h
@@ -99,6 +99,7 @@ public:
std::string publicSpendKey() const override;
std::string publicMultisigSignerKey() const override;
std::string path() const override;
+ void stop() override;
bool store(const std::string &path) override;
std::string filename() const override;
std::string keysFilename() const override;
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
index c2559d1df..e8efc58b8 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -508,6 +508,11 @@ struct Wallet
virtual std::string publicMultisigSignerKey() const = 0;
/*!
+ * \brief stop - interrupts wallet refresh() loop once (doesn't stop background refresh thread)
+ */
+ virtual void stop() = 0;
+
+ /*!
* \brief store - stores wallet to file.
* \param path - main filename to store wallet to. additionally stores address file and keys file.
* to store to the same file - just pass empty string;