aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-02 18:16:38 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-02 18:16:39 +0200
commitf9e60dcd551b9f5b4a86a730d0abfc97a6767519 (patch)
treee1613849aa7a66b11876a03b081c4cc4f6450ca8 /src/cryptonote_core/tx_pool.cpp
parent05de1bc398178decc6a46c0b4a0da3975339cc89 (diff)
parent0644eed7728d3b5146ca7b53f7c50a56b02b327b (diff)
downloadmonzero-core-f9e60dcd551b9f5b4a86a730d0abfc97a6767519.tar.gz
monzero-core-f9e60dcd551b9f5b4a86a730d0abfc97a6767519.tar.xz
monzero-core-f9e60dcd551b9f5b4a86a730d0abfc97a6767519.zip
Merge pull request #1617
0644eed7 Remove boost/foreach.cpp includes (Miguel Herranz) 36dd3e23 Replace BOOST_REVERSE_FOREACH with ranged for (Miguel Herranz) 629e3101 Replace BOOST_FOREACH with C++11 ranged for (Miguel Herranz)
Diffstat (limited to 'src/cryptonote_core/tx_pool.cpp')
-rw-r--r--src/cryptonote_core/tx_pool.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp
index 6ad139023..f810f6a60 100644
--- a/src/cryptonote_core/tx_pool.cpp
+++ b/src/cryptonote_core/tx_pool.cpp
@@ -240,7 +240,7 @@ namespace cryptonote
// assume failure during verification steps until success is certain
tvc.m_verifivation_failed = true;
- BOOST_FOREACH(const auto& in, tx.vin)
+ for(const auto& in: tx.vin)
{
CHECKED_GET_SPECIFIC_VARIANT(in, const txin_to_key, txin, false);
std::unordered_set<crypto::hash>& kei_image_set = m_spent_key_images[txin.k_image];
@@ -275,7 +275,7 @@ namespace cryptonote
// ND: Speedup
// 1. Move transaction hash calcuation outside of loop. ._.
crypto::hash actual_hash = get_transaction_hash(tx);
- BOOST_FOREACH(const txin_v& vi, tx.vin)
+ for(const txin_v& vi: tx.vin)
{
CHECKED_GET_SPECIFIC_VARIANT(vi, const txin_to_key, txin, false);
auto it = m_spent_key_images.find(txin.k_image);
@@ -415,7 +415,7 @@ namespace cryptonote
void tx_memory_pool::get_transactions(std::list<transaction>& txs) const
{
CRITICAL_REGION_LOCAL(m_transactions_lock);
- BOOST_FOREACH(const auto& tx_vt, m_transactions)
+ for(const auto& tx_vt: m_transactions)
txs.push_back(tx_vt.second.tx);
}
//------------------------------------------------------------------
@@ -488,7 +488,7 @@ namespace cryptonote
bool tx_memory_pool::have_tx_keyimges_as_spent(const transaction& tx) const
{
CRITICAL_REGION_LOCAL(m_transactions_lock);
- BOOST_FOREACH(const auto& in, tx.vin)
+ for(const auto& in: tx.vin)
{
CHECKED_GET_SPECIFIC_VARIANT(in, const txin_to_key, tokey_in, true);//should never fail
if(have_tx_keyimg_as_spent(tokey_in.k_image))