aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.cpp
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:35:19 +0100
commite72e625eb1de24a63903a2c91cfbe634eb2676cc (patch)
tree62b46779f93156245b522ffd49467a6482fdff04 /src/cryptonote_core/tx_pool.cpp
parentMerge pull request #2349 (diff)
downloadmonero-e72e625eb1de24a63903a2c91cfbe634eb2676cc.tar.xz
tx_pool: wrap tx meta updates in a LockedTXN
Diffstat (limited to 'src/cryptonote_core/tx_pool.cpp')
-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 265a4ca3e..68e0b556f 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -863,6 +863,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())
{