Merge pull request #6907

39e30d548 wallet2_api: implement stop() to interrupt refresh() loop once (xiphon)
This commit is contained in:
Riccardo Spagni 2020-10-18 17:38:47 +02:00
commit 30918a27ab
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
3 changed files with 11 additions and 0 deletions

View file

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

View file

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

View file

@ -506,6 +506,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.