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)
This commit is contained in:
Riccardo Spagni 2017-08-07 16:01:40 +02:00
commit 3db039828e
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
4 changed files with 12 additions and 0 deletions

View File

@ -392,6 +392,9 @@ else()
set(ARCH_FLAG "")
elseif(PPC64LE)
set(ARCH_FLAG "-mcpu=${ARCH}")
elseif(IOS AND ARCH STREQUAL "arm64")
message(STATUS "IOS: Changing arch from arm64 to armv8")
set(ARCH_FLAG "-march=armv8")
else()
set(ARCH_FLAG "-march=${ARCH}")
endif()

View File

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

View File

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

View File

@ -379,6 +379,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
*