tx_pool: wrap tx meta updates in a LockedTXN

This commit is contained in:
moneromooo-monero 2017-08-29 16:35:19 +01:00
parent 72b5f37f58
commit e72e625eb1
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -863,6 +863,9 @@ namespace cryptonote
std::unordered_set<crypto::key_image> k_images; 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"); 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(); auto sorted_it = m_txs_by_fee_and_receive_time.begin();
while (sorted_it != m_txs_by_fee_and_receive_time.end()) while (sorted_it != m_txs_by_fee_and_receive_time.end())
{ {