aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-10-06 15:45:43 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-10-06 15:47:29 +0300
commit8b0cb8caa44b9e985611b72ba956c170e6eea64a (patch)
treed64a8527833c8a828ad195ed45c3b8a9a9afb81c /src/wallet/api
parentInitialize transaction history if empty (diff)
downloadmonero-8b0cb8caa44b9e985611b72ba956c170e6eea64a.tar.xz
libwallet_api: some renamings
Diffstat (limited to 'src/wallet/api')
-rw-r--r--src/wallet/api/transaction_history.cpp3
-rw-r--r--src/wallet/api/transaction_history.h2
-rw-r--r--src/wallet/api/wallet.cpp1
3 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/api/transaction_history.cpp b/src/wallet/api/transaction_history.cpp
index 190aa67c5..5f99750d5 100644
--- a/src/wallet/api/transaction_history.cpp
+++ b/src/wallet/api/transaction_history.cpp
@@ -60,6 +60,7 @@ TransactionHistoryImpl::~TransactionHistoryImpl()
int TransactionHistoryImpl::count() const
{
+ boost::lock_guard<boost::mutex> guarg(m_historyMutex);
return m_history.size();
}
@@ -80,7 +81,7 @@ std::vector<TransactionInfo *> TransactionHistoryImpl::getAll() const
void TransactionHistoryImpl::refresh()
{
// multithreaded access:
- boost::lock_guard<boost::mutex> guarg(m_refreshMutex);
+ boost::lock_guard<boost::mutex> guarg(m_historyMutex);
// TODO: configurable values;
uint64_t min_height = 0;
diff --git a/src/wallet/api/transaction_history.h b/src/wallet/api/transaction_history.h
index 0b7e079b9..04db7e8e1 100644
--- a/src/wallet/api/transaction_history.h
+++ b/src/wallet/api/transaction_history.h
@@ -52,7 +52,7 @@ private:
// TransactionHistory is responsible of memory management
std::vector<TransactionInfo*> m_history;
WalletImpl *m_wallet;
- boost::mutex m_refreshMutex;
+ mutable boost::mutex m_historyMutex;
};
}
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index eb6fe5db2..5150c3640 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -201,7 +201,6 @@ bool WalletImpl::create(const std::string &path, const std::string &password, co
bool keys_file_exists;
bool wallet_file_exists;
tools::wallet2::wallet_exists(path, keys_file_exists, wallet_file_exists);
- // TODO: figure out how to setup logger;
LOG_PRINT_L3("wallet_path: " << path << "");
LOG_PRINT_L3("keys_file_exists: " << std::boolalpha << keys_file_exists << std::noboolalpha
<< " wallet_file_exists: " << std::boolalpha << wallet_file_exists << std::noboolalpha);