aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-07-31 20:09:44 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:30:08 +0100
commit0263dd2d23679cf5564d34011de02d5fd5f96650 (patch)
tree202ec0d7f01f4269572998969fa046869ea384f6 /src/cryptonote_core/tx_pool.cpp
parentwallet2: factor m_spent changes (diff)
downloadmonero-0263dd2d23679cf5564d34011de02d5fd5f96650.tar.xz
core: add some locking around pool use
Diffstat (limited to 'src/cryptonote_core/tx_pool.cpp')
-rw-r--r--src/cryptonote_core/tx_pool.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index e7d3908e5..dcbb7cc04 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -662,6 +662,7 @@ namespace cryptonote
//---------------------------------------------------------------------------------
size_t tx_memory_pool::validate(uint8_t version)
{
+ CRITICAL_REGION_LOCAL(m_transactions_lock);
size_t n_removed = 0;
size_t tx_size_limit = (version < 2 ? TRANSACTION_SIZE_LIMIT_V1 : TRANSACTION_SIZE_LIMIT_V2);
for (auto it = m_transactions.begin(); it != m_transactions.end(); ) {