diff options
author | Ilya Kitaev <mbg033@gmail.com> | 2016-10-05 19:01:26 +0300 |
---|---|---|
committer | Ilya Kitaev <mbg033@gmail.com> | 2016-10-06 15:47:29 +0300 |
commit | db3282cdf00aae69fdd38680b4f58999d8c5d34a (patch) | |
tree | 68953a8e6f146411aff6d31489b47941ba6ca0d4 /src/wallet/api/transaction_history.cpp | |
parent | libwallet_api: fixes for transaction history (diff) | |
download | monero-db3282cdf00aae69fdd38680b4f58999d8c5d34a.tar.xz |
Initialize transaction history if empty
Diffstat (limited to '')
-rw-r--r-- | src/wallet/api/transaction_history.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet/api/transaction_history.cpp b/src/wallet/api/transaction_history.cpp index 86dff85a4..190aa67c5 100644 --- a/src/wallet/api/transaction_history.cpp +++ b/src/wallet/api/transaction_history.cpp @@ -79,6 +79,9 @@ std::vector<TransactionInfo *> TransactionHistoryImpl::getAll() const void TransactionHistoryImpl::refresh() { + // multithreaded access: + boost::lock_guard<boost::mutex> guarg(m_refreshMutex); + // TODO: configurable values; uint64_t min_height = 0; uint64_t max_height = (uint64_t)-1; @@ -88,8 +91,6 @@ void TransactionHistoryImpl::refresh() delete t; m_history.clear(); - - // transactions are stored in wallet2: // - confirmed_transfer_details - out transfers // - unconfirmed_transfer_details - pending out transfers |