diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-08-07 16:01:40 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-08-07 16:01:40 +0200 |
commit | 3db039828eab03a5672981c1daedd4ce9f0287df (patch) | |
tree | 728d239c0e468c8316211399aa6fc99b093cf8ea /src/wallet | |
parent | Merge pull request #2259 (diff) | |
parent | walletAPI: add getRefreshFromBlockHeight() (diff) | |
download | monero-3db039828eab03a5672981c1daedd4ce9f0287df.tar.xz |
Merge pull request #2254
e31aac80 walletAPI: add getRefreshFromBlockHeight() (Jaquee)
48c0cb1b wallet api: pause refresh while commiting tx (Jaquee)
f233c01c CMakeLists.txt - ios/xcode fix (Jaquee)
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/api/pending_transaction.cpp | 2 | ||||
-rw-r--r-- | src/wallet/api/wallet.h | 1 | ||||
-rw-r--r-- | src/wallet/wallet2_api.h | 6 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/wallet/api/pending_transaction.cpp b/src/wallet/api/pending_transaction.cpp index 9798d66c6..c98a599e7 100644 --- a/src/wallet/api/pending_transaction.cpp +++ b/src/wallet/api/pending_transaction.cpp @@ -102,6 +102,7 @@ bool PendingTransactionImpl::commit(const std::string &filename, bool overwrite) } // Commit tx else { + m_wallet.pauseRefresh(); while (!m_pending_tx.empty()) { auto & ptx = m_pending_tx.back(); m_wallet.m_wallet->commit_tx(ptx); @@ -133,6 +134,7 @@ bool PendingTransactionImpl::commit(const std::string &filename, bool overwrite) m_status = Status_Error; } + m_wallet.startRefresh(); return m_status == Status_Ok; } diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index e9e2cc580..07b0f063b 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -98,6 +98,7 @@ public: void setAutoRefreshInterval(int millis); int autoRefreshInterval() const; void setRefreshFromBlockHeight(uint64_t refresh_from_block_height); + uint64_t getRefreshFromBlockHeight() const { return m_wallet->get_refresh_from_block_height(); }; void setRecoveringFromSeed(bool recoveringFromSeed); bool watchOnly() const; bool rescanSpent(); diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h index a136954f0..27ad79816 100644 --- a/src/wallet/wallet2_api.h +++ b/src/wallet/wallet2_api.h @@ -380,6 +380,12 @@ struct Wallet virtual void setRefreshFromBlockHeight(uint64_t refresh_from_block_height) = 0; /*! + * \brief getRestoreHeight - get wallet creation height + * + */ + virtual uint64_t getRefreshFromBlockHeight() const = 0; + + /*! * \brief setRecoveringFromSeed - set state recover form seed * * \param recoveringFromSeed - true/false |