From ff1cdf30d74bb763afe511c85f07c51a90ccd22f Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 29 Aug 2017 16:35:19 +0100 Subject: [PATCH] tx_pool: wrap tx meta updates in a LockedTXN --- src/cryptonote_core/tx_pool.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 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()) {