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 "") set(ARCH_FLAG "")
elseif(PPC64LE) elseif(PPC64LE)
set(ARCH_FLAG "-mcpu=${ARCH}") 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() else()
set(ARCH_FLAG "-march=${ARCH}") set(ARCH_FLAG "-march=${ARCH}")
endif() endif()

View File

@ -102,6 +102,7 @@ bool PendingTransactionImpl::commit(const std::string &filename, bool overwrite)
} }
// Commit tx // Commit tx
else { else {
m_wallet.pauseRefresh();
while (!m_pending_tx.empty()) { while (!m_pending_tx.empty()) {
auto & ptx = m_pending_tx.back(); auto & ptx = m_pending_tx.back();
m_wallet.m_wallet->commit_tx(ptx); 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_status = Status_Error;
} }
m_wallet.startRefresh();
return m_status == Status_Ok; return m_status == Status_Ok;
} }

View File

@ -98,6 +98,7 @@ public:
void setAutoRefreshInterval(int millis); void setAutoRefreshInterval(int millis);
int autoRefreshInterval() const; int autoRefreshInterval() const;
void setRefreshFromBlockHeight(uint64_t refresh_from_block_height); void setRefreshFromBlockHeight(uint64_t refresh_from_block_height);
uint64_t getRefreshFromBlockHeight() const { return m_wallet->get_refresh_from_block_height(); };
void setRecoveringFromSeed(bool recoveringFromSeed); void setRecoveringFromSeed(bool recoveringFromSeed);
bool watchOnly() const; bool watchOnly() const;
bool rescanSpent(); bool rescanSpent();

View File

@ -379,6 +379,12 @@ struct Wallet
*/ */
virtual void setRefreshFromBlockHeight(uint64_t refresh_from_block_height) = 0; 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 * \brief setRecoveringFromSeed - set state recover form seed
* *