aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-29 16:35:19 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-29 16:47:33 +0100
commitff1cdf30d74bb763afe511c85f07c51a90ccd22f (patch)
tree96c37d1ad1196226f496a0e4fddf5602cab95f2c
parentMerge pull request #2343 (diff)
downloadmonero-ff1cdf30d74bb763afe511c85f07c51a90ccd22f.tar.xz
tx_pool: wrap tx meta updates in a LockedTXN
-rw-r--r--src/cryptonote_core/tx_pool.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 7b98acb63..543faa920 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -859,6 +859,9 @@ namespace cryptonote
std::unordered_set<crypto::key_image> k_images;
LOG_PRINT_L2("Filling block template, median size " << median_size << ", " << m_txs_by_fee_and_receive_time.size() << " txes in the pool");
+
+ LockedTXN lock(m_blockchain);
+
auto sorted_it = m_txs_by_fee_and_receive_time.begin();
while (sorted_it != m_txs_by_fee_and_receive_time.end())
{